Announcement

Collapse
No announcement yet.

V-Ray GPU access another PB ID (C#)

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

  • V-Ray GPU access another PB ID (C#)

    Is it possible to access another ParamBlock ID via MaxSDK .NET wrapper (C#) when as current renderer is set V-Ray GPU? Without problems I can get only PB ID0 (V-Ray GPU).

    If current (or production) renderer is set V-Ray - no problems. Simple example property setter:
    Code:
    public bool ColorMapAffectBack
            {
                get => _ColorMapAffectBack;
                set
                {
                    if (_ColorMapAffectBack == value) return;
                    _ColorMapAffectBack = value;
                    NotifyPropertyChanged(() => ColorMapAffectBack);
                    if (_Vrender == null) return;
                    if (VrayType == 2) return;
                    if (Core     == null) return;
    
                    var val = ColorMapAffectBack ? 1 : 0;
                    var pb9 = _Vrender.GetParamBlockByID(9);
                    pb9?.SetValue(178, Core.Time, val, Constants.TabIndexZero);
                }
            }
    I try to avoid maxscript. Via maxscript it is possibile (f. e.):
    Code:
    renderers.current.V_Ray_settings.colorMapping_type = 0
    Last edited by Siger; 15-09-2018, 12:04 AM.
    Regimantas Valiukas
    SIGER STUDIO
    www.sigerstudio.eu

  • #2
    Hello,

    V-Ray GPU has an internal instance of the whole VRender object - that's the one accessible with the MAXScript code: renderers.current.V_Ray_settings

    The VRender object is the second reference in the V-Ray GPU renderer (GetReference(1)).

    Best regards,
    Yavor
    Yavor Rubenov
    V-Ray for 3ds Max developer

    Comment


    • #3
      Thank you very much, Yavor!
      Regimantas Valiukas
      SIGER STUDIO
      www.sigerstudio.eu

      Comment

      Working...
      X