<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    these flags all tell Cycles which kind of shaders are used (Do we
    have a Surface (or only volume), Emission or a Transparent BSDF)?<br>
    <br>
    They are set and checked for in various places in render/ e.g.
    shader.cpp, light.cpp ...<br>
    <br>
    Again, please just search the code yourself. You should really be
    able to search a codebase for a variable. That is not magic.<br>
    <br>
    Thomas<br>
    <br>
    <div class="moz-cite-prefix">Am 01.04.2016 um 00:17 schrieb Mohamed
      Sakr:<br>
    </div>
    <blockquote
cite="mid:CABgy2LskVZspWWwOOuaLiQrf=Gafmnk94rBp+Mz1f-_XSwXbmg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Thomas,<br>
        <br>
        great!, but what I meant is:<br>
        where do you set them? I checked the blender exporter and didn't
        see any flag set.<br>
        are they set automatically? or they need a manual checks.<br>
        <br>
        cheers,<br>
        Mohamed Sakr</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Mar 31, 2016 at 8:10 PM, Thomas
          Dinges <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:blender@dingto.org" target="_blank">blender@dingto.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
            Mohamed,<br>
            <br>
            grep is a Linux terminal command, that can be used to search
            files, in<br>
            this case for a variable.<br>
            Alternatively you can use an IDE or another tool of your
            choice.<br>
            <br>
            The flags are used in various places inside the kernel, to
            determine if<br>
            we need certain things.<br>
            <br>
            Hope that helps.<br>
            <br>
            Best regards,<br>
            Thomas<br>
            <div class="HOEnZb">
              <div class="h5"><br>
                Am 31.03.2016 um 18:36 schrieb Mohamed Sakr:<br>
                &gt; Hi Sergey,<br>
                &gt;<br>
                &gt; after testing, I see colors are matching in the 2
                branches, sorry this<br>
                &gt; was my fault.<br>
                &gt; but the unsolved question: do these flags do
                anything? I see they are<br>
                &gt; not touched anywhere.<br>
                &gt;<br>
                &gt; cheers,<br>
                &gt; Mohamed Sakr<br>
                &gt;<br>
                &gt; On 3/31/16, Mohamed Sakr &lt;<a
                  moz-do-not-send="true" href="mailto:3dsakr@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:3dsakr@gmail.com">3dsakr@gmail.com</a></a>&gt;
                wrote:<br>
                &gt;&gt; Hi Sergey,<br>
                &gt;&gt;<br>
                &gt;&gt; my branch is similar to yours, just some
                different stuff in the<br>
                &gt;&gt; standalone part "exporter"<br>
                &gt;&gt; I didn't understand what is grep?<br>
                &gt;&gt;<br>
                &gt;&gt; cheers,<br>
                &gt;&gt; Mohamed Sakr<br>
                &gt;&gt;<br>
                &gt;&gt; On 3/31/16, Sergey Sharybin &lt;<a
                  moz-do-not-send="true"
                  href="mailto:sergey.vfx@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:sergey.vfx@gmail.com">sergey.vfx@gmail.com</a></a>&gt;
                wrote:<br>
                &gt;&gt;&gt; Hi,<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; I can't tell you what could be wrong in
                your branch because it's nowhere<br>
                &gt;&gt;&gt; published and i can't give cleaner answer
                where the variables are used<br>
                &gt;&gt;&gt; than<br>
                &gt;&gt;&gt; grep will do it:<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; grep -wR "has_surface" .<br>
                &gt;&gt;&gt; grep -wR "has_surface_emission" .<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; and so on.<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; On Thu, Mar 31, 2016 at 5:26 PM, Mohamed
                Sakr &lt;<a moz-do-not-send="true"
                  href="mailto:3dsakr@gmail.com">3dsakr@gmail.com</a>&gt;
                wrote:<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; Hi,<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; I wonder where are these flags used?
                Shader::has_surface,<br>
                &gt;&gt;&gt;&gt; has_surface_emission, ...etc..<br>
                &gt;&gt;&gt;&gt; the reason to ask:<br>
                &gt;&gt;&gt;&gt; I checked my branch against Blender,
                the scene is pretty simple.<br>
                &gt;&gt;&gt;&gt; 2 cubes which got only emission to
                surface, first cube is (255 50 0),<br>
                &gt;&gt;&gt;&gt; second is (153 255 0)<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; inside Blender results appear correctly
                "same chosen color"<br>
                &gt;&gt;&gt;&gt; inside my branch results appear wrong
                "for example with increased<br>
                &gt;&gt;&gt;&gt; emission strength, values go toward 255
                255 0 .."<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; any idea if these flags are responsible
                for this? or anything else<br>
                &gt;&gt;&gt;&gt; that is missing in my Shader?<br>
                &gt;&gt;&gt;&gt; I debugged input values and they are
                correct.<br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;&gt; cheers,<br>
                &gt;&gt;&gt;&gt; Mohamed Sakr<br>
                &gt;&gt;&gt;&gt;
                _______________________________________________<br>
                &gt;&gt;&gt;&gt; Bf-cycles mailing list<br>
                &gt;&gt;&gt;&gt; <a moz-do-not-send="true"
                  href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
                &gt;&gt;&gt;&gt; <a moz-do-not-send="true"
                  href="https://lists.blender.org/mailman/listinfo/bf-cycles"
                  rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
                &gt;&gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt;<br>
                &gt;&gt;&gt; --<br>
                &gt;&gt;&gt; With best regards, Sergey Sharybin<br>
                &gt;&gt;&gt;<br>
                &gt; _______________________________________________<br>
                &gt; Bf-cycles mailing list<br>
                &gt; <a moz-do-not-send="true"
                  href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
                &gt; <a moz-do-not-send="true"
                  href="https://lists.blender.org/mailman/listinfo/bf-cycles"
                  rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
                <br>
                _______________________________________________<br>
                Bf-cycles mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
                <a moz-do-not-send="true"
                  href="https://lists.blender.org/mailman/listinfo/bf-cycles"
                  rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Bf-cycles mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a>
<a class="moz-txt-link-freetext" href="https://lists.blender.org/mailman/listinfo/bf-cycles">https://lists.blender.org/mailman/listinfo/bf-cycles</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>