Solved How do I get the status of redshift AOV mode?

working on something in python, and i'm trying to create some if statements depending on whether AOV's are Enabled or Disabled. The Command Line tells me to use "Redshift[c4d.REDSHIFT_RENDERER_AOV_GLOBAL_MODE]" but this only returns "None" regardless of whether it's enabled or disabled. How do I access this data?

Thank you

Hi,

Please mark your thread as a question using the forum tools.

Redshift is a VideoPostData plugin. You cannot access the parameter directly in the renderdata. This is just a guess of what you are trying to do.

Instead, you must find the VideoPostData that contain all Redshift parameters.

from typing import Optional
import c4d
import redshift

doc: c4d.documents.BaseDocument  # The active document
op: Optional[c4d.BaseObject]  # The active object, None if unselected

def main() -> None:
    renderdata = doc.GetActiveRenderData()
    vprs = redshift.FindAddVideoPost(renderdata, redshift.VPrsrenderer)
    if vprs is None:
        raise ValueError("Cannot find the redshift VideoPostData")
    print (vprs[c4d.REDSHIFT_RENDERER_AOV_GLOBAL_MODE])


if __name__ == '__main__':
    main()

There is this thread where you will find a script to print all the AOVs

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer

Hi,

Please mark your thread as a question using the forum tools.

Redshift is a VideoPostData plugin. You cannot access the parameter directly in the renderdata. This is just a guess of what you are trying to do.

Instead, you must find the VideoPostData that contain all Redshift parameters.

from typing import Optional
import c4d
import redshift

doc: c4d.documents.BaseDocument  # The active document
op: Optional[c4d.BaseObject]  # The active object, None if unselected

def main() -> None:
    renderdata = doc.GetActiveRenderData()
    vprs = redshift.FindAddVideoPost(renderdata, redshift.VPrsrenderer)
    if vprs is None:
        raise ValueError("Cannot find the redshift VideoPostData")
    print (vprs[c4d.REDSHIFT_RENDERER_AOV_GLOBAL_MODE])


if __name__ == '__main__':
    main()

There is this thread where you will find a script to print all the AOVs

Cheers,
Manuel

MAXON SDK Specialist

MAXON Registered Developer