Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RenderPassHierarchyEnumerator.cs
Go to the documentation of this file.
1 using System.Linq;
2 
3 using SiliconStudio.Paradox.Effects;
4 using SiliconStudio.Paradox.Games;
5 using SiliconStudio.Paradox.Games.ViewModel;
6 
7 namespace ScriptTest
8 {
10  {
11  public void GenerateChildren(ViewModelContext context, IViewModelNode viewModelNode, ref bool handled)
12  {
13  if (viewModelNode.NodeValue is RenderPass)
14  {
15  viewModelNode.Children.Add(new ViewModelNode("Name", new PropertyInfoViewModelContent(new ParentNodeValueViewModelContent(), typeof(ComponentBase).GetProperty("Name"))));
16  viewModelNode.Children.Add(new ViewModelNode("SubPasses", EnumerableViewModelContent.FromUnaryLambda<ViewModelReference, RenderPass>(new ParentNodeValueViewModelContent(),
17  (renderPass) => renderPass.Passes != null
18  ? renderPass.Passes.Select(x => new ViewModelReference(x, true))
19  : Enumerable.Empty<ViewModelReference>())));
20  }
21  }
22  }
23 }
void GenerateChildren(ViewModelContext context, IViewModelNode viewModelNode, ref bool handled)
RenderPass is a hierarchy that defines how to collect and render meshes.
Definition: RenderPass.cs:19