Hitting the "Render Target" button programmatically

Forums: Hitting the "Render Target" button programmatically
A public forum for discussing and asking questions about the Octane for Unity Alpha

Moderator: ChrisHekman

Hitting the "Render Target" button programmatically

Postby Facebook-AY » Fri Jan 22, 2021 11:57 pm

Facebook-AY Fri Jan 22, 2021 11:57 pm
Trying to automate a few things, and realized that I'm not sure how I can hit a render target component's "Render" button or open the Octane window with "View Source"

Is this possible? Is there an API anywhere that I can gleam?

Any direction would be helpful. Thank you!
Facebook-AY
Licensed Customer
Licensed Customer
 
Posts: 2
Joined: Sun Dec 02, 2018 3:44 pm

Re: Hitting the "Render Target" button programmatically

Postby ChrisHekman » Mon Feb 15, 2021 1:42 pm

ChrisHekman Mon Feb 15, 2021 1:42 pm
There is no explicit API you can see no. However you should be able to do this programmatically.

PBRRenderTargetComponent should be publically excessable.
PBRRenderTargetComponent has a member called RenderTarget
Then in the scene you can set the active rendertarget thusly:

Dirty example:
Code: Select all
OctaneUnity.PBRRenderTargetComponent comp = GetCompoment<OctaneUnity.PBRRenderTargetComponent>();
OctaneUnity.Scene.Instance.RenderTarget = comp.RenderTarget;


This should activate rendering
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 710
Joined: Wed Jan 18, 2017 3:09 pm

Return to Octane for Unity


Who is online

Users browsing this forum: No registered users and 3 guests

Thu Feb 25, 2021 2:07 pm [ UTC ]