Exemplo n.º 1
0
 /// <summary>
 /// Create a new shader for client.
 /// </summary>
 /// <param name="client">Client ID for C[CS]ycles API.</param>
 /// <param name="type">The type of shader to create</param>
 public Shader(Client client, ShaderType type)
 {
     Client = client;
     Type = type;
     Id = CSycles.create_shader(Client.Id);
     Output = new OutputNode();
     AddNode(Output);
     created_in_cycles = false;
     Verbose = false;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create front for existing shader. Note that
 /// functionality through this can be limited.
 /// Generally used only for interal matters
 /// </summary>
 /// <param name="client"></param>
 /// <param name="type"></param>
 /// <param name="id"></param>
 internal Shader(Client client, ShaderType type, uint id)
 {
     Client = client;
     Type = type;
     Id = id;
     Output = new OutputNode();
     AddNode(Output);
     created_in_cycles = true;
     Verbose = false;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Clear the shader graph for this node, so it can be repopulated.
        /// </summary>
        public void Recreate()
        {
            CSycles.shader_new_graph(Client.Id, Id);

            m_nodes.Clear();

            Output = new OutputNode();
            AddNode(Output);
        }