13 #ifndef __GUI_DisplayOption__
14 #define __GUI_DisplayOption__
33 class GUI_RotoscopeData;
52 #define ANY_FLAG_ACTIVE_IN_SETS(METHOD) \
53 bool METHOD##Any() const \
54 { return ((*this)[GUI_SCENE_OBJECT].METHOD() || \
55 (*this)[GUI_SELECTED_SCENE_OBJECT].METHOD() || \
56 (*this)[GUI_GHOST_SCENE_OBJECT].METHOD() || \
57 (*this)[GUI_DISPLAY_MODEL].METHOD() || \
58 (*this)[GUI_CURRENT_MODEL].METHOD() || \
59 (*this)[GUI_TEMPLATE_MODEL].METHOD()); }
77 {
return *myDisplaySet[myDisplaySetMap[
type]]; }
79 {
return *myDisplaySet[myDisplaySetMap[
type]]; }
84 {
return *myDisplaySet[
type]; }
94 bool save(std::ostream &)
const;
101 { myDisplaySetMap[follower] =
reference; }
106 {
return myDisplaySetMap[
t]; }
110 void enableSceneOption(
const char *
name,
bool enable);
111 bool isSceneOptionEnabled(
const char *
name)
const;
115 { myRenderType =
t; }
141 {
return myFlags.drawEnvironmentMaps; }
143 {
return myFlags.drawFilteredBackgrounds; }
145 {
return myFlags.showIKCriticalZones; }
147 {
return myFlags.drawCameraMask; }
151 {
return myFlags.drawVertexAttrib2D; }
153 {
return myFlags.autoDetectAttribType2D; }
179 { myMatAssignMode =
mode; }
191 { myFlags.showCurrentOutput = onoff;}
207 { myFlags.drawEnvironmentMaps =onoff;}
209 { myFlags.drawFilteredBackgrounds=onoff;}
211 { myFlags.showIKCriticalZones =onoff;}
213 { myFlags.drawCameraMask =onoff;}
216 { myFlags.drawVertexAttrib2D = onoff; }
218 { myFlags.autoDetectAttribType2D = onoff; }
220 { myFlags.drawSpecular = onoff; }
222 { common().drawMultiTexture(onoff); }
224 { myFlags.applySelectMask = onoff; }
225 void drawXRay(
bool xray) { myFlags.drawXRay = xray; }
235 { myObjectMaterialLimit=
SYSmax(1,m); }
238 { myHandleHighlightSize =
SYSclamp(hl, 0, 2); }
241 { myOriginGnomonSize =
SYSmax(size, 0.0); }
244 { myFloatingGnomonSize =
SYSmax(size, 0.0); }
273 float &aspect_ratio)
const;
280 const char *file,
float quality);
282 const char *
path,
float quality);
288 fpreal getRotoQuality()
const;
292 bool file_path,
const char *
path);
301 { myFlags.showForegroundImage = enable; }
303 {
return myFlags.showForegroundImage; }
305 { myFGImage = file_node_path; }
308 { myFlags.useForegroundDepth = enable; }
310 {
return myFlags.useForegroundDepth; }
312 { myFGDepthPlane = plane; }
314 {
return myFGDepthPlane; }
324 { myFGDepthStyle = style; }
326 {
return myFGDepthStyle; }
329 { myFGOpacity =
SYSclamp(opacity, 0.0, 1.0); }
331 {
return myFGOpacity; }
335 arr[0] = myImageMinUV[0];
336 arr[1] = myImageMinUV[1];
340 myImageMinUV[0] = arr[0];
341 myImageMinUV[1] = arr[1];
345 arr[0] = myImageMaxUV[0];
346 arr[1] = myImageMaxUV[1];
350 myImageMaxUV[0] = arr[0];
351 myImageMaxUV[1] = arr[1];
356 arr[0] = myRotoViews[view].myImageOffset[0];
357 arr[1] = myRotoViews[view].myImageOffset[1];
361 myRotoViews[view].myImageOffset[0] = arr[0];
362 myRotoViews[view].myImageOffset[1] = arr[1];
366 arr[0] = myRotoViews[view].myImageScale[0];
367 arr[1] = myRotoViews[view].myImageScale[1];
371 myRotoViews[view].myImageScale[0] = arr[0];
372 myRotoViews[view].myImageScale[1] = arr[1];
376 {
return myRotoViews[view].myOpacity; }
378 { myRotoViews[view].myOpacity = opacity; }
423 {
return myRotoViews[view].myImageFitMode; }
425 { myRotoViews[view].myImageFitMode = fit_mode; }
428 {
return myRotoViews[view].myBrightness; }
430 { myRotoViews[view].myBrightness = brightness; }
433 { myRotoViews[view].myAutoPlaceImage = onoff; }
435 {
return myRotoViews[view].myAutoPlaceImage; }
438 { myRotoViews[view].myEnvMapImage = onoff; }
440 {
return myRotoViews[view].myEnvMapImage; }
444 int getRotoVideoClipStartFrame(
GUI_RotoView view)
const;
445 void setRotoVideoClipStartFrame(
GUI_RotoView view,
int start_frame);
448 void setRotoVideoClipEndFrame(
GUI_RotoView view,
int end_frame);
456 const char * getRotoVideoColorSpace(
GUI_RotoView view)
const;
457 void setRotoVideoColorSpace(
GUI_RotoView view,
const char *color_space);
459 bool getRotoVideoFrameRateEnabled(
GUI_RotoView view)
const;
470 int getRotoVideoSourceFrameCount(
GUI_RotoView view)
const;
474 { myUseFixedImageRes = use_fixed; }
476 {
return myUseFixedImageRes; }
478 { myUseViewportRes = use_vp; }
480 {
return myUseViewportRes; }
484 myFixedImageRes.assign(w,h);
487 {
return myForLopsView ? myFixedImageRes :
UT_Vector2i(0,0); }
489 { myCurrentImageRes.assign(w,h); }
491 {
return myForLopsView ? myCurrentImageRes :
UT_Vector2i(0,0); }
493 { myImageResFraction =fraction; }
495 {
return myImageResFraction; }
507 { theHandleScale =
SYSclamp(v, 0.01
f, 1.0
f); }
511 void removeUserOption(
int option_id);
515 void refreshUserOptionVersions();
522 void setObjectLevel(
bool onoff);
543 GUI_DISP_STEREO_RIGHT
549 { myStereoPass = pass; }
551 {
return (myStereoPass == GUI_DISP_STEREO_BOTH ||
552 myStereoPass == GUI_DISP_STEREO_LEFT); }
554 {
return (myStereoPass == GUI_DISP_STEREO_BOTH ||
555 myStereoPass == GUI_DISP_STEREO_RIGHT); }
577 { myUseHeadlight = headlight; }
600 bool Specular =
true;
614 bool ShowBackground =
false;
637 bool ShowBackground =
false;
678 { myShadowMapGenTime=
SYSmax(0.0,t); }
684 { myFlags.myFastHQIntLight = e; }
686 {
return myFlags.myFastHQIntLight; }
713 { myUniformFog.myFogColor =
c; }
720 {
return myUniformFog.myFogHeightMode; }
722 { myUniformFog.myFogHeightMode =
SYSclamp(m,-1,1); }
726 {
return myUniformFog.myFogFalloff; }
728 { myUniformFog.myFogFalloff =
f; }
730 { myUniformFog.myFogIntensity=
SYSmax(0.0,f); }
732 {
return myUniformFog.myFogIntensity; }
739 { myUniformFogUseClip = d; }
741 {
return myUniformFogUseClip; }
743 { myUniformFogClipDistance = d; }
745 {
return myUniformFogClipDistance; }
756 { myVolumeFog.myFogColor =
c; }
763 {
return myVolumeFog.myFogHeightMode; }
765 { myVolumeFog.myFogHeightMode =
SYSclamp(m,-1,1); }
769 {
return myVolumeFog.myFogFalloff; }
771 { myVolumeFog.myFogFalloff =
f; }
773 { myVolumeFog.myFogIntensity=
SYSmax(0.0,f); }
775 {
return myVolumeFog.myFogIntensity; }
778 { myVolumeFogQuality =
SYSclamp(q, 0,3); }
781 myVolumeFogScatterPara =
SYSmax(0.0, para);
782 myVolumeFogScatterPerp =
SYSmax(0.0, perp);
786 para = myVolumeFogScatterPara;
787 perp = myVolumeFogScatterPerp;
804 DEFAULT_MATERIAL_SIMPLE = 0,
805 DEFAULT_MATERIAL_MATCAP
807 void setDefaultMaterialType(DefaultMaterialType
type);
808 void setDefaultMatCapFile(
const UT_StringRef &tex_filepath);
809 void setDefaultMatCapIntensity(
fpreal intensity);
810 void setDefaultMaterialDiffuse(
UT_Color col);
811 void setDefaultMaterialSpecular(
UT_Color col);
812 void setDefaultMaterialAmbient(
UT_Color col);
813 void setDefaultMaterialEmission(
UT_Color col);
814 void setDefaultMaterialRoughness(
fpreal rough);
815 void setDefaultMaterialSpecRoughness(
fpreal srough);
818 {
return myDefaultMatType; }
820 {
return myDefaultMatCapFile; }
822 {
return myDefaultMatCapIntensity; }
829 {
return myDefaultSpecRough; }
841 int &max2d,
int &max3d)
const;
849 float myImageMinUV[2];
850 float myImageMaxUV[2];
852 fpreal myOriginGnomonSize;
853 fpreal myFloatingGnomonSize;
854 int myHandleHighlightSize;
856 static float theHandleScale;
858 HeadlightParms myHeadlightParms;
859 DomelightParms myDomelightParms;
860 PhysicalSkyParms myPhysicalSkyParms;
861 ThreePointParms myThreePointParms;
862 bool myUseHeadlight =
false;
863 bool myHeadlightHQ =
false;
864 bool myHeadlightDirty =
true;
865 HeadlightType myHeadlightType = HEADLIGHT;
871 fpreal myDefaultSpecRough;
872 bool myDefaultMaterialDirty;
874 DefaultMaterialType myDefaultMatType;
876 fpreal myDefaultMatCapIntensity;
877 bool myDefaultMatCapDirty;
879 fpreal myXRayWireStrength;
885 float myImageOffset[2] = {0.0f, 0.0f};
886 float myImageScale[2] = {1.0f, 1.0f};
887 float myOpacity = 1.0f;
888 float myBrightness = 1.0f;
889 bool myAutoPlaceImage =
false;
891 bool myEnvMapImage =
false;
896 FGDepthStyle myFGDepthStyle;
899 unsigned mySelectMask;
908 showCurrentOutput :1,
923 drawEnvironmentMaps :1,
924 drawFilteredBackgrounds:1,
925 drawVertexAttrib2D :1,
926 autoDetectAttribType2D:1,
928 showIKCriticalZones :1,
943 showForegroundImage :1,
944 useForegroundDepth :1,
951 unsigned isObjectLevel :1;
956 int myObjectMaterialLimit;
958 gui_StereoPass myStereoPass;
960 bool myLoadedDefaults;
961 exint myMSSUpdateSerial;
962 gui_MatAssignMode myMatAssignMode;
967 int myLightSampleLimit;
968 int myShadowMapMemMB;
969 fpreal myShadowMapGenTime;
974 fpreal myImageResFraction;
975 bool myUseFixedImageRes;
976 bool myUseViewportRes;
977 bool myCameraCropMask;
978 mutable bool myPhysicalSkyFileDirty =
true;
984 FogParms() : myFogColor(1.0,1.0,1.0), myFogDensity(1.0),
985 myFogOpacity(1.0), myFogStart(0.0), myFogEnd(1000.0),
986 myFogHeightMode(0), myFogHeight(100.0),
987 myFogIntensity(1.0), myFogFalloff(10.0)
999 FogParms myUniformFog;
1000 fpreal myUniformFogClipDistance;
1001 bool myUniformFogUseClip =
true;
1002 bool myUniformFogUseSun;
1003 fpreal myUniformFogSunBloom;
1005 FogParms myVolumeFog;
1006 int myVolumeFogQuality;
1007 fpreal myVolumeFogScatterPara;
1008 fpreal myVolumeFogScatterPerp;
1015 DOFBokeh myDOFBokeh;
fpreal getUniformFogHeight() const
FGDepthStyle getForegroundDepthStyle() const
UI_Value & getObjectLevelNotify()
void drawObjectOrigins(bool org)
bool isStereoRightRender() const
void setForegroundImageDepth(bool enable)
void setCurrentImageRes(int w, int h)
bool getUseFixedImageRes() const
void setVolumeFogStart(fpreal s)
void getImageMinUV(float arr[2]) const
void showFullNames(bool onoff)
fpreal getDefaultMaterialRoughness() const
void showIKCriticalZones(bool onoff)
const PhysicalSkyParms & physicalSkyParms() const
bool useHeadlight() const
bool isObjectLevel() const
UT_Color getDefaultMaterialSpecular() const
void drawFilteredBackgrounds(bool onoff)
void setVolumeFogEnable(bool fog)
void setForegroundImageEnable(bool enable)
const int GUI_NUM_DISPLAY_MODEL_SETS
fpreal xrayWireStrength() const
bool materialUpdate() const
void drawViewPivot(bool onoff)
fpreal getBloomThreshold() const
static float getHandleScale()
const DomelightParms & domelightParms() const
fpreal getVolumeFogStart() const
void setVolumeFogQuality(int q)
void setDrawCameraMask(bool onoff)
void showMaterials(bool show)
const GR_DisplayOption & operator[](GUI_DisplaySetType type) const
int getShadowMapMemMB() const
fpreal getUniformFogOpacity() const
DefaultMaterialType getDefaultMaterialType() const
void setUseFixedImageRes(bool use_fixed)
float getBrightness(GUI_RotoView view) const
bool drawFilteredBackgrounds() const
void drawWalls(bool onoff)
GLsizei const GLchar *const * path
UT_UniquePtr< GUI_RotoscopeData > myRotoscopeData
void foregroundOpacity(fpreal opacity)
UT_Color getDefaultMaterialEmission() const
void drawStickyOrigin(bool onoff)
bool drawObjectOrigins() const
void getImageOffset(GUI_RotoView view, float arr[2]) const
ThreePointParms & threePointParms()
void setVolumeFogOpacity(fpreal d)
fpreal getUniformFogSunBloom() const
const UT_StringRef & getForegroundDepthPlane() const
void setVolumeFogFalloff(fpreal f)
GLboolean GLboolean GLboolean GLboolean a
const ThreePointParms & threePointParms() const
void drawYZPlane(bool onoff)
void drawMultiTexture(bool onoff)
void setImageMinUV(float arr[2])
bool drawViewPivot() const
bool showNonSelected() const
Opaque reference to a texture stored in the RV_TextureCache.
bool drawSpecular() const
bool getDrawCameraMask() const
void setFastInteractiveHQLight(bool e)
int getVolumeFogHeightMode() const
void setForegroundImage(const UT_StringRef &file_node_path)
void setUniformFogOpacity(fpreal d)
bool areHeadlightParmsDirty() const
GLenum GLenum GLsizei const GLuint GLboolean enabled
void setOpacity(GUI_RotoView view, float opacity)
void handleHighlightSize(int hl)
void setVolumeFogDensity(fpreal d)
fpreal floatingGnomonSize() const
GLdouble GLdouble GLdouble q
void setVolumeFogHeightMode(int m)
bool isDOFEnabled() const
bool getForegroundImageEnable() const
int getHQLightLimit() const
bool showFullNames() const
UT_Color getDefaultMaterialAmbient() const
GUI_DisplaySetType
Context specific display options for geometry states.
void showDisplay(bool onoff)
Temporary container for either a RV_Render and an RE_Render.
bool getFastInteractiveHQLight() const
void setImageOffset(GUI_RotoView view, float arr[2])
int getLightSamplingLimit() const
void setDOFTexture(const UT_StringRef &tex)
exint getMSSUpdateSerial() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
bool getHeadlightHighQuality() const
void setHeadlightParmsDirty(bool dirty)
void setUniformFogUseSun(bool d)
bool getUseViewportRes() const
void xrayWireStrength(fpreal w)
void showObjectNames(bool onoff)
fpreal getVolumeFogEnd() const
GA_API const UT_StringHolder scale
bool showIKCriticalZones() const
fpreal getVolumeFogOpacity() const
void setLightSamplingLimit(int limit)
GLint GLint GLsizei GLint GLenum GLenum type
void envMapImage(GUI_RotoView view, bool onoff)
const UT_StringRef & getDefaultMatCapFile() const
void setShadowMapGenTime(fpreal t)
bool getCameraCropMask() const
const UT_StringRef & getUVMapFile() const
void getImageMaxUV(float arr[2]) const
bool getUniformFogUseClip() const
GR_CommonDispOption & common()
bool hasLightSamplingLimit() const
void setSelectMask(unsigned mask)
void setUniformFogFalloff(fpreal f)
fpreal getVolumeFogFalloff() const
fpreal getVolumeFogHeight() const
void setFogNode(const char *node)
void showSelected(bool onoff)
void drawSpecular(bool onoff)
void showTemplates(bool onoff)
fpreal getVolumeFogDensity() const
float getOpacity(GUI_RotoView view) const
void setBloomEnable(bool e)
fpreal getBloomScale() const
const GR_CommonDispOption & common() const
void setBloomThreshold(fpreal th)
void drawXZPlane(bool onoff)
fpreal getShadowMapGenTime() const
void setDOFBokehAspect(fpreal a)
void setCameraCropMask(bool crop)
bool drawFieldGuide() const
void setUniformFogClipDistance(fpreal d)
void setUniformFogHeight(fpreal h)
UT_Vector3T< T > SYSclamp(const UT_Vector3T< T > &v, const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
void mssPerPrim(bool mpp)
fpreal getImageResFraction() const
void setHQLightLimit(int nlights)
void autoPlaceImage(GUI_RotoView view, bool onoff)
void setDOFEnable(bool dof)
void showGuides(bool onoff)
void setUniformFogUseClip(bool d)
void setVolumeFogColor(const UT_Vector3F &c)
fpreal getUniformFogClipDistance() const
void drawBackgrounds(bool onoff)
const UT_StringRef & getFogNode() const
bool drawBackgrounds() const
bool getUniformFogUseSun() const
void setUniformFogHeightMode(int m)
const int GUI_NUM_ROTO_VIEWS
void dirtyPhysicalSkyMap()
fpreal getDefaultMaterialSpecRoughness() const
bool isStereoLeftRender() const
bool autoPlaceImage(GUI_RotoView view) const
int objectMaterialLimit() const
GLuint const GLchar * name
void floatingGnomonSize(fpreal size)
const UT_StringRef & getForegroundImage() const
void showCurrentOutput(bool onoff)
void clearDefaultMaterialDirty()
UT_Vector3F getVolumeFogColor() const
void drawXYPlane(bool onoff)
fpreal getBloomIntensity() const
void setUniformFogColor(const UT_Vector3F &c)
static void setHandleScale(float v)
GLboolean GLboolean GLboolean b
void setUseViewportRes(bool use_vp)
const int GUI_NUM_DISPLAY_SCENE_SETS
void setFixedImageRes(int w, int h)
bool autoDetectAttribType2D() const
fpreal getUniformFogFalloff() const
void setDOFBokehBoost(fpreal b)
void drawFieldGuide(bool onoff)
int getVolumeFogQuality() const
gui_MatAssignMode materialAssignMode() const
void setVolumeFogLightScatter(fpreal para, fpreal perp)
bool showMaterials() const
void materialUpdate(bool update)
bool drawEnvironmentMaps() const
void setForegroundDepthPlane(const UT_StringRef &plane)
void setHeadlightHighQuality(bool hq)
void setVolumeFogHeight(fpreal h)
bool drawMultiTexture() const
void setImageFitMode(GUI_RotoView view, ImageFitMode fit_mode)
GR_DisplayOption & operator[](GUI_DisplaySetType type)
void setBrightness(GUI_RotoView view, float brightness)
GR_RenderVersion getRenderType() const
gui_StereoPass
For the OpenGL ROP only: Allows a single stereo camera to be rendered.
fpreal getUniformFogIntensity() const
void drawOrigin(bool onoff)
fpreal getUniformFogEnd() const
void setUniformFogIntensity(fpreal f)
void setForegroundDepthStyle(FGDepthStyle style)
void setHeadlightType(HeadlightType type)
void setBloomScale(fpreal sc)
GLfloat GLfloat GLfloat GLfloat h
#define ANY_FLAG_ACTIVE_IN_SETS(METHOD)
void materialAssignMode(gui_MatAssignMode mode)
bool isDefaultMaterialDirty() const
bool drawStickyOrigin() const
bool showCurrentOutput() const
fpreal getUniformFogDensity() const
void setUniformFogSunBloom(fpreal f)
void setUniformFogStart(fpreal s)
GUI_RotoView
Viewport type for Rotoscope settings.
HeadlightParms & headlightParms()
bool showTemplates() const
DOFBokeh getDOFBokeh() const
fpreal getDefaultMatCapIntensity() const
bool hasHQLightLimit() const
UT_Vector2i getCurrentImageRes() const
void setImageScale(GUI_RotoView view, float arr[2])
bool drawVertexAttrib2D() const
bool showObjectNames() const
fpreal getDOFBokehBoost() const
void originGnomonSize(fpreal size)
UT_Vector3F getUniformFogColor() const
bool getForegroundImageDepth() const
ImageFitMode getImageFitMode(GUI_RotoView view) const
LeafData & operator=(const LeafData &)=delete
void setVolumeFogEnd(fpreal e)
const UT_StringRef & getDOFTexture() const
const HeadlightParms & headlightParms() const
GUI_DisplaySetType getDisplaySetRemap(GUI_DisplaySetType t) const
UT_Color getDefaultMaterialDiffuse() const
const int GUI_NUM_DISPLAY_SETS
void drawEnvironmentMaps(bool onoff)
fpreal getUniformFogStart() const
bool isDefaultMatCapDirty() const
bool showSelected() const
int getUniformFogHeightMode() const
void applySelectMask(bool onoff)
fpreal foregroundOpacity() const
bool showFootprints() const
void drawVertexAttrib2D(bool onoff)
void setVolumeFogIntensity(fpreal f)
void setDisplaySetRemap(GUI_DisplaySetType follower, GUI_DisplaySetType reference)
Remap the display option set to another set.
bool drawSafeArea() const
fpreal getVolumeFogIntensity() const
void setSeparateStereoRender(gui_StereoPass pass)
bool envMapImage(GUI_RotoView view) const
bool clearDefaultMatCapDirty()
fpreal getUVMapScale() const
GLubyte GLubyte GLubyte GLubyte w
void drawBadges(bool onoff)
void showFootprints(bool onoff)
void drawSafeArea(bool onoff)
bool useMaterialOverrides() const
fpreal getDOFBokehAspect() const
bool isUniformFogEnabled() const
void moveModeOn(bool onoff)
void setDOFBokeh(DOFBokeh b)
void setRenderType(GR_RenderVersion t)
int handleHighlightSize() const
bool applySelectMask() const
ImageBuf OIIO_API crop(const ImageBuf &src, ROI roi={}, int nthreads=0)
PhysicalSkyParms & physicalSkyParms()
fpreal originGnomonSize() const
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate and *a name There is also one special expression reference
void setShadowMapMemMB(int mem)
void showNonSelected(bool onoff)
void setUniformFogEnd(fpreal e)
void setUseHeadlight(bool headlight)
bool isVolumeFogEnabled() const
void setImageMaxUV(float arr[2])
void getVolumeFogLightScatter(fpreal ¶, fpreal &perp) const
unsigned getSelectMask() const
void autoDetectAttribType2D(bool onoff)
void useMaterialOverrides(bool ovr)
void getImageScale(GUI_RotoView view, float arr[2]) const
void setImageResFraction(fpreal fraction)
void setBloomIntensity(fpreal i)
void setUniformFogDensity(fpreal d)
UT_Vector2T< int32 > UT_Vector2i
HeadlightType getHeadlightType() const
bool isBloomEnabled() const
void forceMSSUpdate(bool)
void setUniformFogEnable(bool fog)
void objectMaterialLimit(int m)
GR_DisplayOption & getDisplaySet(GUI_DisplaySetType type)
Direct cccess to the display set, without any mapping.
DomelightParms & domelightParms()
UT_Vector2i getFixedImageRes() const