13 #ifndef __GUI_DisplayOption__
14 #define __GUI_DisplayOption__
33 class OPUI_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); }
270 float &aspect_ratio)
const;
277 const char *file,
float quality);
279 const char *
path,
float quality);
285 fpreal getRotoQuality()
const;
289 bool file_path,
const char *
path);
298 { myFlags.showForegroundImage = enable; }
300 {
return myFlags.showForegroundImage; }
302 { myFGImage = file_node_path; }
305 { myFlags.useForegroundDepth = enable; }
307 {
return myFlags.useForegroundDepth; }
309 { myFGDepthPlane = plane; }
311 {
return myFGDepthPlane; }
321 { myFGDepthStyle = style; }
323 {
return myFGDepthStyle; }
326 { myFGOpacity =
SYSclamp(opacity, 0.0, 1.0); }
328 {
return myFGOpacity; }
332 arr[0] = myImageMinUV[0];
333 arr[1] = myImageMinUV[1];
337 myImageMinUV[0] = arr[0];
338 myImageMinUV[1] = arr[1];
342 arr[0] = myImageMaxUV[0];
343 arr[1] = myImageMaxUV[1];
347 myImageMaxUV[0] = arr[0];
348 myImageMaxUV[1] = arr[1];
353 arr[0] = myRotoViews[view].myImageOffset[0];
354 arr[1] = myRotoViews[view].myImageOffset[1];
358 myRotoViews[view].myImageOffset[0] = arr[0];
359 myRotoViews[view].myImageOffset[1] = arr[1];
363 arr[0] = myRotoViews[view].myImageScale[0];
364 arr[1] = myRotoViews[view].myImageScale[1];
368 myRotoViews[view].myImageScale[0] = arr[0];
369 myRotoViews[view].myImageScale[1] = arr[1];
373 {
return myRotoViews[view].myOpacity; }
375 { myRotoViews[view].myOpacity = opacity; }
420 {
return myRotoViews[view].myImageFitMode; }
422 { myRotoViews[view].myImageFitMode = fit_mode; }
425 {
return myRotoViews[view].myBrightness; }
427 { myRotoViews[view].myBrightness = brightness; }
430 { myRotoViews[view].myAutoPlaceImage = onoff; }
432 {
return myRotoViews[view].myAutoPlaceImage; }
435 { myRotoViews[view].myEnvMapImage = onoff; }
437 {
return myRotoViews[view].myEnvMapImage; }
471 { myUseFixedImageRes = use_fixed; }
473 {
return myUseFixedImageRes; }
475 { myUseViewportRes = use_vp; }
477 {
return myUseViewportRes; }
481 myFixedImageRes.assign(w,h);
484 {
return myForLopsView ? myFixedImageRes :
UT_Vector2i(0,0); }
486 { myCurrentImageRes.assign(w,h); }
488 {
return myForLopsView ? myCurrentImageRes :
UT_Vector2i(0,0); }
490 { myImageResFraction =fraction; }
492 {
return myImageResFraction; }
504 { theHandleScale =
SYSclamp(v, 0.01
f, 1.0
f); }
508 void removeUserOption(
int option_id);
512 void refreshUserOptionVersions();
519 void setObjectLevel(
bool onoff);
540 GUI_DISP_STEREO_RIGHT
546 { myStereoPass = pass; }
548 {
return (myStereoPass == GUI_DISP_STEREO_BOTH ||
549 myStereoPass == GUI_DISP_STEREO_LEFT); }
551 {
return (myStereoPass == GUI_DISP_STEREO_BOTH ||
552 myStereoPass == GUI_DISP_STEREO_RIGHT); }
574 void setHeadlightIntensity(
fpreal i);
580 void setHeadlightSpecular(
bool use_spec);
592 { myShadowMapGenTime=
SYSmax(0.0,t); }
598 { myFlags.myFastHQIntLight = e; }
600 {
return myFlags.myFastHQIntLight; }
627 { myUniformFog.myFogColor = c; }
634 {
return myUniformFog.myFogHeightMode; }
636 { myUniformFog.myFogHeightMode =
SYSclamp(m,-1,1); }
640 {
return myUniformFog.myFogFalloff; }
642 { myUniformFog.myFogFalloff =
f; }
644 { myUniformFog.myFogIntensity=
SYSmax(0.0,f); }
646 {
return myUniformFog.myFogIntensity; }
653 { myUniformFogClipDistance = d; }
655 {
return myUniformFogClipDistance; }
666 { myVolumeFog.myFogColor = c; }
673 {
return myVolumeFog.myFogHeightMode; }
675 { myVolumeFog.myFogHeightMode =
SYSclamp(m,-1,1); }
679 {
return myVolumeFog.myFogFalloff; }
681 { myVolumeFog.myFogFalloff =
f; }
683 { myVolumeFog.myFogIntensity=
SYSmax(0.0,f); }
685 {
return myVolumeFog.myFogIntensity; }
688 { myVolumeFogQuality =
SYSclamp(q, 0,3); }
691 myVolumeFogScatterPara =
SYSmax(0.0, para);
692 myVolumeFogScatterPerp =
SYSmax(0.0, perp);
696 para = myVolumeFogScatterPara;
697 perp = myVolumeFogScatterPerp;
714 DEFAULT_MATERIAL_SIMPLE = 0,
715 DEFAULT_MATERIAL_MATCAP
717 void setDefaultMaterialType(DefaultMaterialType
type);
718 void setDefaultMatCapFile(
const UT_StringRef &tex_filepath);
719 void setDefaultMatCapIntensity(
fpreal intensity);
720 void setDefaultMaterialDiffuse(
UT_Color col);
721 void setDefaultMaterialSpecular(
UT_Color col);
722 void setDefaultMaterialAmbient(
UT_Color col);
723 void setDefaultMaterialEmission(
UT_Color col);
724 void setDefaultMaterialRoughness(
fpreal rough);
725 void setDefaultMaterialSpecRoughness(
fpreal srough);
728 {
return myDefaultMatType; }
730 {
return myDefaultMatCapFile; }
732 {
return myDefaultMatCapIntensity; }
739 {
return myDefaultSpecRough; }
751 int &max2d,
int &max3d)
const;
759 float myImageMinUV[2];
760 float myImageMaxUV[2];
762 fpreal myOriginGnomonSize;
763 int myHandleHighlightSize;
765 static float theHandleScale;
768 fpreal myHeadlightIntensity;
769 bool myHeadlightSpec;
777 fpreal myDefaultSpecRough;
778 bool myDefaultMaterialDirty;
780 DefaultMaterialType myDefaultMatType;
782 fpreal myDefaultMatCapIntensity;
783 bool myDefaultMatCapDirty;
785 fpreal myXRayWireStrength;
791 float myImageOffset[2] = {0.0f, 0.0f};
792 float myImageScale[2] = {1.0f, 1.0f};
793 float myOpacity = 1.0f;
794 float myBrightness = 1.0f;
795 bool myAutoPlaceImage =
false;
797 bool myEnvMapImage =
false;
802 FGDepthStyle myFGDepthStyle;
805 unsigned mySelectMask;
814 showCurrentOutput :1,
829 drawEnvironmentMaps :1,
830 drawFilteredBackgrounds:1,
831 drawVertexAttrib2D :1,
832 autoDetectAttribType2D:1,
834 showIKCriticalZones :1,
849 showForegroundImage :1,
850 useForegroundDepth :1,
857 unsigned isObjectLevel :1;
862 int myObjectMaterialLimit;
864 gui_StereoPass myStereoPass;
866 bool myLoadedDefaults;
867 exint myMSSUpdateSerial;
868 gui_MatAssignMode myMatAssignMode;
873 int myLightSampleLimit;
874 int myShadowMapMemMB;
875 fpreal myShadowMapGenTime;
880 fpreal myImageResFraction;
881 bool myUseFixedImageRes;
882 bool myUseViewportRes;
883 bool myCameraCropMask;
888 FogParms() : myFogColor(1.0,1.0,1.0), myFogDensity(1.0),
889 myFogOpacity(1.0), myFogStart(0.0), myFogEnd(1000.0),
890 myFogHeightMode(0), myFogHeight(100.0),
891 myFogIntensity(1.0), myFogFalloff(10.0)
903 FogParms myUniformFog;
904 fpreal myUniformFogClipDistance;
905 bool myUniformFogUseSun;
906 fpreal myUniformFogSunBloom;
908 FogParms myVolumeFog;
909 int myVolumeFogQuality;
910 fpreal myVolumeFogScatterPara;
911 fpreal myVolumeFogScatterPerp;
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)
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()
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 getHeadlightIntensity() 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
void foregroundOpacity(fpreal opacity)
UT_Color getDefaultMaterialEmission() const
void drawStickyOrigin(bool onoff)
bool drawObjectOrigins() const
void getImageOffset(GUI_RotoView view, float arr[2]) const
void setVolumeFogOpacity(fpreal d)
fpreal getUniformFogSunBloom() const
const UT_StringRef & getForegroundDepthPlane() const
void setVolumeFogFalloff(fpreal f)
GLboolean GLboolean GLboolean GLboolean a
void drawYZPlane(bool onoff)
bool getHeadlightSpecular() const
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)
GLenum GLenum GLsizei const GLuint GLboolean enabled
void setOpacity(GUI_RotoView view, float opacity)
void handleHighlightSize(int hl)
void setVolumeFogDensity(fpreal d)
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
UT_Vector3D getHeadlightDirection() const
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)
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
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
UT_UniquePtr< OPUI_RotoscopeData > myRotoscopeData
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 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
fpreal getDefaultMaterialSpecRoughness() const
bool isStereoLeftRender() const
bool autoPlaceImage(GUI_RotoView view) const
int objectMaterialLimit() const
GLuint const GLchar * name
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 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.
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
void setVolumeFogEnd(fpreal e)
const UT_StringRef & getDOFTexture() 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)
fpreal originGnomonSize() const
void setShadowMapMemMB(int mem)
void showNonSelected(bool onoff)
void setUniformFogEnd(fpreal e)
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
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.
UT_Vector2i getFixedImageRes() const