Graphics

 View Only
  • 1.  Changing a Material's Diffuse Property via Scripting

    Posted 6 days ago
    I am pretty sure this is possible, but not too sure how to go about it.
    I have a Config Scene with 3 text objects (one for Hue, one for Saturation, one for luminance - or RGB).
    I want to have a process where my operator can input a value into each text field in hopes to change the color of a Material. (Ex: If they want a purple they could input the following, H: 252, S: 87, L: 84).
    Then, when the scene is pushed online, it would change the material's diffuse color. As a result, this would also change every scene that material is being used in. 

    ***Or is it possible to do one text object and type in a hex code (Ex:#421CD6) instead of HSL or RGB?

    I have looked in the SDK at the xpMaterial but I do not see anything along the lines of "SetColorDiffuse".  I do see a ColorDiffuse Property but it says it is read only. 

    Any thoughts on this?

    ------------------------------
    Dalton Paul
    Senior Graphics Producer
    ------------------------------


  • 2.  RE: Changing a Material's Diffuse Property via Scripting

    Posted 6 days ago
    You can achieve it via Visual Logic if that works for you.

    ------------------------------
    Matt Gamble
    ------------------------------



  • 3.  RE: Changing a Material's Diffuse Property via Scripting

    Ross Staff
    Posted 6 days ago
    You can also use dynamic materials and marcos. 
    For example this is red typed directly into dynamic material  #AARRGGBB

    And then this is doing the same but using a text macro which could then be published. 



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------