Scripted Render parameters reset on render save

zigraphixzigraphix Posts: 2,787

This is kind of weird, and I'm trying to figure out if it's a bug.

I have a render script, which works fine. It's a variation on the Outline script set that ships with the 4.x SDK. My version sets the Color ID Line Color
to white (255,255,255). However, after I save a render, this value gets reset to black (0,0,0). Does anyone know why DS does this and how I can
keep it from happening? "0,0,0" doesn't appear anywhere in my scripts, so I'm guessing it's some kind of built-in default....

Post edited by Richard Haseltine on

Comments

  • zigraphixzigraphix Posts: 2,787
    edited December 1969

    Nobody? Should I file a bug? I have a product I'm feeling uneasy about submitting to the store because of this....

  • rbtwhizrbtwhiz Posts: 2,250
    edited December 1969

    The Outline Scripted Renderer scripts don't ship with the SDK, they ship with the application.

    Black is the default for a Color. If you don't set a value, black is what it will be.

    var clrTest = new Color();
    print( clrTest.red, clrTest.green, clrTest.blue );

    The rest of your question/statement is too vague to explain why you may be experiencing what you are.

    No, you should not submit a bug to obtain scripting assistance. That is what this forum is for. You should only submit a bug if it is in fact a bug.

    -Rob

  • zigraphixzigraphix Posts: 2,787
    edited December 2013

    I'll try to explain my question more clearly, with a test case.

    1. In DS 4.6.1.3.9, I load a sphere primitive.

    2. In Render Settings, I choose Scripted 3Delight.

    3. I select the Outline render script.

    4. In Outlines > Color ID > Color ID Line Color I select a color other than black, e.g. red (255,0,0)

    5. Render

    6. A red circle is generated in the file Outline_Frm0_ColorID.tif

    7. Save the render

    8. The Color ID Line Color changes back to black.

    This seems very strange to me. The color doesn't change when the scene is saved, only when the render is saved. Is there a way to keep DS from
    changing the parameter after the render is saved? I can change the color back myself, but I want to make a product for others to use, and it's
    quite confusing to have the first render work as expected and the next one appear to fail.

    Thank you in advance for your patience.

    Edited to add: another PA has verified that this also happens on their system.

    Post edited by Richard Haseltine on
  • zigraphixzigraphix Posts: 2,787
    edited December 2013

    In case anyone else ever encounters this problem, I found the reference. It's in the ..resources\Scripted Renderer\Outline\Outline.dsa script.
    In function buildOutlineRenderProperties, there's this line:

    oProperty = addColorProperty(sPropertyGroup, sNamePrefix + g_sBASE_EDGE_COLOR, sLablePrefix + g_sBASE_EDGE_COLOR, new Color(0, 0, 0), new Color(0, 0, 0), false, false, undefined);


    I didn't find this on search because of the spaces after the commas.
    But once I changed the color values to (255,255,255) the reset on render save problem went away.

    Edited by a mod to add line breaks

    Post edited by Richard Haseltine on
  • Richard HaseltineRichard Haseltine Posts: 100,939
    edited December 1969

    Edited the posts to add line breaks within paragraphs, since the code snippet was (at least for me in Firefox) breaking the page layou.

  • zigraphixzigraphix Posts: 2,787
    edited December 2013

    Thanks. It's still breaking page layout on my version of Firefox. I thought the Code formatting would fix that.... should I edit the line further to show
    just the relevant section?

    Post edited by Richard Haseltine on
  • Richard HaseltineRichard Haseltine Posts: 100,939
    edited December 1969

    What I did was break the text lines so they didn't run into the margin - the code is at least legible as it gets a
    background box, the plain message text was black on black once it passed the page layout.

Sign In or Register to comment.