18 #ifndef __HUSD_Imaging_h__
19 #define __HUSD_Imaging_h__
52 class husd_DefaultRenderSettingContext;
67 void setScene(HUSD_Scene *scene_ref);
76 DRAW_WIRE_SHADED_SMOOTH
79 void showPurposeRender(
bool enable);
80 void showPurposeProxy(
bool enable);
81 void showPurposeGuide(
bool enable);
83 void setDrawMode(DrawMode
mode);
84 void setDrawComplexity(
float complexity);
85 void setBackfaceCull(
bool cull);
89 bool setFrame(
fpreal frame);
91 void setHeadlightIntensity(
fpreal intensity);
92 void setThreePointLights(
const UT_Vector3F &key_color,
101 void setPhysicalSky(
const fpreal32 &sun_int,
105 void setLighting(
bool enable);
106 void setMaterials(
bool enable);
112 void setAllowStormRenderer(
bool allow_storm);
120 BufferSet hasAOVBuffers()
const;
126 void setPostRenderCallback(ImagingCallback cb);
127 bool getUsingCoreProfile();
133 bool launchBackgroundRender(
const UT_Matrix4D &view_matrix,
140 void waitForUpdateToComplete();
142 bool checkRender(
bool do_render);
144 void updateComposite(
145 bool free_buffers_if_missing,
156 const PXL_Raster *background_raster =
nullptr,
157 int bleft = -1,
int bbottom = -1,
158 int bright = -1,
int btop = -1,
177 bool camera_synced =
true)
179 if(path != myCameraPath)
182 mySettingsChanged =
true;
185 if(camera_synced != myCameraSynced)
187 myCameraSynced = camera_synced;
188 mySettingsChanged =
true;
195 { myRenderPassPath =
path; }
198 { myCompositor = comp; }
203 {
return !isUpdateRunning() && myConverged; }
204 void terminateRender(
bool hard_halt =
true);
210 {
return myRendererName; }
211 void getRendererCommands(
214 void invokeRendererCommand(
218 RUNNING_UPDATE_NOT_STARTED = 0,
223 bool isUpdateRunning()
const;
224 bool isUpdateComplete()
const;
231 bool canPause()
const;
232 bool isPausedByUser()
const;
233 bool isStoppedByUser()
const;
234 bool rendererCreated()
const;
240 {
return myAllowUpdates; }
242 { myAllowUpdates = allow_updates; }
244 static void initializeAvailableRenderers();
247 void setRenderSettings(
const UT_StringRef &settings_path,
250 const UT_Vector4F &render_region={ 0.0, 0.0, 0.0, 0.0 });
259 void setRenderFocus(
int x,
int y)
const;
260 void clearRenderFocus()
const;
265 void setRenderSettingsDataWindowActive(
bool active);
271 void getPrimPathsFromRenderKeys(
275 void updateDeferredPrims();
279 { mySlapcompProgramManager = manager; }
284 return mySlapcompProgramManager &&
285 mySlapcompProgramManager->isEnabled();
292 return mySlapcompProgramManager &&
293 mySlapcompProgramManager->hasStateChanged();
298 void updatePlanes(
bool ignore_slapcomp);
303 void handleCopTextureChange(
bool time_changed);
305 void setCopTextureChangeCallback(ImagingCallback cb);
308 class husd_ImagingPrivate;
309 class husd_IMXRenderBuffer;
316 void registerSlapcompAOVs(
321 void runSlapcompIfNeeded(
327 husd_IMXRenderBuffer*
b)
330 void resetImagingEngine();
332 bool updateRestartCameraSettings(
bool cam_effects)
const;
333 bool anyRestartRenderSettingsChanged()
const;
338 const PXR_NS::VtValue &
value,
339 bool from_usd_prim =
false);
341 RunningStatus updateRenderData(
const UT_Matrix4D &view_matrix,
345 void gatherCopResolverDependencies();
346 void finishRender(
bool do_render);
354 unsigned myWantsHeadlight : 1,
356 myWantsDomelight : 1,
358 myWantsThreePointlight : 1,
359 myHasThreePointlight : 1,
360 myWantsPhysicalSky : 1,
361 myHasPhysicalSky : 1,
365 mySettingsChanged : 1,
367 myWorkLightsChanged : 1,
368 myValidRenderSettingsPrim : 1,
372 bool myAllowStormRenderer;
376 ImagingCallback myPostRenderCallback;
377 ImagingCallback myCopTextureChangeCallback;
387 BufferSet myLastCompositedBufferSet;
390 fpreal myHeadlightIntensity;
408 bool myHandlingCopTextureChange;
const UT_StringHolder & currentAov() const
UT_Map< HUSD_Path, UT_Array< UT_Vector3 > > HUSD_PointMap
void setAOVCompositor(HUSD_Compositor *comp)
XUSD_RenderSettings contains the HdRenderSettings for the render.
GLsizei const GLfloat * value
GLsizei const GLchar *const * path
GA_API const UT_StringHolder rot
IFDmantra you can see code vm_image_mplay_direction endcode When SOHO starts a render
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
const UT_StringHolder & rendererName() const
const UT_StringHolder & outputPlane() const
Simple interface around HdRenderBuffer.
bool isSlapcompEnabled() const
Returns true if slapcomp is enabled.
bool slapcompStateChanged() const
HUSD_API const char * resolution()
GLuint const GLchar * name
std::function< T > UT_Function
GLboolean GLboolean GLboolean b
ImageBuf OIIO_API rotate(const ImageBuf &src, float angle, string_view filtername=string_view(), float filterwidth=0.0f, bool recompute_roi=false, ROI roi={}, int nthreads=0)
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
void setCameraPath(const UT_StringRef &path, bool camera_synced=true)
void setRenderPassPrimPath(const HUSD_Path &path)
GLfloat GLfloat GLfloat GLfloat h
A map of string to various well defined value types.
const UT_StringArray & rendererPlanes() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
void setAllowUpdates(bool allow_updates)
#define PXR_NAMESPACE_CLOSE_SCOPE
GLubyte GLubyte GLubyte GLubyte w
UT_Function< void(HUSD_Imaging *imaging)> ImagingCallback
void setSlapcompProgramManager(COP_SlapcompDispatcher *manager)
bool allowUpdates() const