Question about calling Graphics function

  • DUC
    7th Aug 2018 Member 0 Permalink

    Is there a way to access or call the graphics function of a certain particle from inside a script? For instance, is there a way to call the graphics function of a specific qrtz particle so that I could obtain its rendering mode or glow colors, etc, at that moment in the simulation?

  • jacob1
    8th Aug 2018 Developer 0 Permalink
    This doesn't make much sense. Graphics functions work by passing in the particle ID, and then the graphic function tells it what rendering / glow modes to use, what colors, etc. That is used for that single particle, it's all only stored temporarily though. Unless "cache" mode is set, in which case the results are cached for every particle of that type from now on.

    If you want to see stuff like what render modes it picked, just generate that yourself. You already have that for your own lua elements. For default elements, it is in the source code how the modes are generated. There is no way to get that information because it is all only held temporarily.
  • DUC
    8th Aug 2018 Member 0 Permalink

    @jacob1 (View Post)

     Ok I see. I was just wondering if I could call a particle's graphics function apart from when it is normally called, giving it the id, colr, etc, and recieving the cache,pmode, etc (thus enabling a script to read a particle's rendering color without reading the source code).

     

    But speaking of colors, I have a question about photons. I read the source code, but I was unable to figure out what determined if photons were reflected by an element (like brck) or passed through it (like filt).