Announcement

Collapse
No announcement yet.

Script plugin, material color change

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script plugin, material color change

    Hi everyone,

    How do I write inside script plugin if I want to change a material color? Thanks in advance

  • #2
    You can define a number of fixed materials in an array meaning declaring them as variables and assigning values to them like:
    Code:
    ct.FindSubContainer("MyContainerName").Material = ct.FindSubContainer("MyContainerName").CreateMaterial(ar[i - 1])
    or
    You can point to the material and set their values as RGB on a range from 0 to 1 like:
    Code:
    ct.FindSubContainer("MyContainerName").Material.Emission =cColor(0.701960784314, 0.149019607843, 0.141176470588)
    Hope this helps

    Comment


    • #3
      material.color=cColor works, Thanks Lars

      Comment

      Working...
      X