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); }
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; }
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 void setHeadlightIntensity(
fpreal i);
583 void setHeadlightSpecular(
bool use_spec);
595 { myShadowMapGenTime=
SYSmax(0.0,t); }
601 { myFlags.myFastHQIntLight = e; }
603 {
return myFlags.myFastHQIntLight; }
630 { myUniformFog.myFogColor =
c; }
637 {
return myUniformFog.myFogHeightMode; }
639 { myUniformFog.myFogHeightMode =
SYSclamp(m,-1,1); }
643 {
return myUniformFog.myFogFalloff; }
645 { myUniformFog.myFogFalloff =
f; }
647 { myUniformFog.myFogIntensity=
SYSmax(0.0,f); }
649 {
return myUniformFog.myFogIntensity; }
656 { myUniformFogClipDistance = d; }
658 {
return myUniformFogClipDistance; }
669 { myVolumeFog.myFogColor =
c; }
676 {
return myVolumeFog.myFogHeightMode; }
678 { myVolumeFog.myFogHeightMode =
SYSclamp(m,-1,1); }
682 {
return myVolumeFog.myFogFalloff; }
684 { myVolumeFog.myFogFalloff =
f; }
686 { myVolumeFog.myFogIntensity=
SYSmax(0.0,f); }
688 {
return myVolumeFog.myFogIntensity; }
691 { myVolumeFogQuality =
SYSclamp(q, 0,3); }
694 myVolumeFogScatterPara =
SYSmax(0.0, para);
695 myVolumeFogScatterPerp =
SYSmax(0.0, perp);
699 para = myVolumeFogScatterPara;
700 perp = myVolumeFogScatterPerp;
717 DEFAULT_MATERIAL_SIMPLE = 0,
718 DEFAULT_MATERIAL_MATCAP
720 void setDefaultMaterialType(DefaultMaterialType
type);
721 void setDefaultMatCapFile(
const UT_StringRef &tex_filepath);
722 void setDefaultMatCapIntensity(
fpreal intensity);
723 void setDefaultMaterialDiffuse(
UT_Color col);
724 void setDefaultMaterialSpecular(
UT_Color col);
725 void setDefaultMaterialAmbient(
UT_Color col);
726 void setDefaultMaterialEmission(
UT_Color col);
727 void setDefaultMaterialRoughness(
fpreal rough);
728 void setDefaultMaterialSpecRoughness(
fpreal srough);
731 {
return myDefaultMatType; }
733 {
return myDefaultMatCapFile; }
735 {
return myDefaultMatCapIntensity; }
742 {
return myDefaultSpecRough; }
754 int &max2d,
int &max3d)
const;
762 float myImageMinUV[2];
763 float myImageMaxUV[2];
765 fpreal myOriginGnomonSize;
766 fpreal myFloatingGnomonSize;
767 int myHandleHighlightSize;
769 static float theHandleScale;
772 fpreal myHeadlightIntensity;
773 bool myHeadlightSpec;
781 fpreal myDefaultSpecRough;
782 bool myDefaultMaterialDirty;
784 DefaultMaterialType myDefaultMatType;
786 fpreal myDefaultMatCapIntensity;
787 bool myDefaultMatCapDirty;
789 fpreal myXRayWireStrength;
795 float myImageOffset[2] = {0.0f, 0.0f};
796 float myImageScale[2] = {1.0f, 1.0f};
797 float myOpacity = 1.0f;
798 float myBrightness = 1.0f;
799 bool myAutoPlaceImage =
false;
801 bool myEnvMapImage =
false;
806 FGDepthStyle myFGDepthStyle;
809 unsigned mySelectMask;
818 showCurrentOutput :1,
833 drawEnvironmentMaps :1,
834 drawFilteredBackgrounds:1,
835 drawVertexAttrib2D :1,
836 autoDetectAttribType2D:1,
838 showIKCriticalZones :1,
853 showForegroundImage :1,
854 useForegroundDepth :1,
861 unsigned isObjectLevel :1;
866 int myObjectMaterialLimit;
868 gui_StereoPass myStereoPass;
870 bool myLoadedDefaults;
871 exint myMSSUpdateSerial;
872 gui_MatAssignMode myMatAssignMode;
877 int myLightSampleLimit;
878 int myShadowMapMemMB;
879 fpreal myShadowMapGenTime;
884 fpreal myImageResFraction;
885 bool myUseFixedImageRes;
886 bool myUseViewportRes;
887 bool myCameraCropMask;
892 FogParms() : myFogColor(1.0,1.0,1.0), myFogDensity(1.0),
893 myFogOpacity(1.0), myFogStart(0.0), myFogEnd(1000.0),
894 myFogHeightMode(0), myFogHeight(100.0),
895 myFogIntensity(1.0), myFogFalloff(10.0)
907 FogParms myUniformFog;
908 fpreal myUniformFogClipDistance;
909 bool myUniformFogUseSun;
910 fpreal myUniformFogSunBloom;
912 FogParms myVolumeFog;
913 int myVolumeFogQuality;
914 fpreal myVolumeFogScatterPara;
915 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)
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
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
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 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
LeafData & operator=(const LeafData &)=delete
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
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)
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