13 #ifndef __GUI_DisplayOption__
14 #define __GUI_DisplayOption__
26 class OPUI_RotoscopeData;
45 #define ANY_FLAG_ACTIVE_IN_SETS(METHOD) \
46 bool METHOD##Any() const \
47 { return ((*this)[GUI_SCENE_OBJECT].METHOD() || \
48 (*this)[GUI_SELECTED_SCENE_OBJECT].METHOD() || \
49 (*this)[GUI_GHOST_SCENE_OBJECT].METHOD() || \
50 (*this)[GUI_DISPLAY_MODEL].METHOD() || \
51 (*this)[GUI_CURRENT_MODEL].METHOD() || \
52 (*this)[GUI_TEMPLATE_MODEL].METHOD()); }
70 {
return *myDisplaySet[myDisplaySetMap[
type]]; }
72 {
return *myDisplaySet[myDisplaySetMap[
type]]; }
77 {
return *myDisplaySet[
type]; }
87 bool save(std::ostream &)
const;
94 { myDisplaySetMap[follower] =
reference; }
99 {
return myDisplaySetMap[
t]; }
103 void enableSceneOption(
const char *
name,
bool enable);
104 bool isSceneOptionEnabled(
const char *
name)
const;
130 {
return myFlags.drawEnvironmentMaps; }
132 {
return myFlags.drawFilteredBackgrounds; }
134 {
return myFlags.showIKCriticalZones; }
136 {
return myFlags.drawCameraMask; }
140 {
return myFlags.drawVertexAttrib2D; }
142 {
return myFlags.autoDetectAttribType2D; }
168 { myMatAssignMode =
mode; }
180 { myFlags.showCurrentOutput = onoff;}
196 { myFlags.drawEnvironmentMaps =onoff;}
198 { myFlags.drawFilteredBackgrounds=onoff;}
200 { myFlags.showIKCriticalZones =onoff;}
202 { myFlags.drawCameraMask =onoff;}
205 { myFlags.drawVertexAttrib2D = onoff; }
207 { myFlags.autoDetectAttribType2D = onoff; }
209 { myFlags.drawSpecular = onoff; }
211 { common().drawMultiTexture(onoff); }
213 { myFlags.applySelectMask = onoff; }
214 void drawXRay(
bool xray) { myFlags.drawXRay = xray; }
224 { myObjectMaterialLimit=
SYSmax(1,m); }
227 { myHandleHighlightSize =
SYSclamp(hl, 0, 2); }
230 { myOriginGnomonSize =
SYSmax(size, 0.0); }
255 const char *file,
float quality);
257 const char *
path,
float quality);
263 fpreal getRotoQuality()
const;
267 bool file_path,
const char *
path);
276 { myFlags.showForegroundImage =
enable; }
278 {
return myFlags.showForegroundImage; }
280 {myFGImage = file_node_path; }
283 { myFlags.useForegroundDepth =
enable; }
285 {
return myFlags.useForegroundDepth; }
287 { myFGDepthPlane = plane; }
289 {
return myFGDepthPlane; }
299 { myFGDepthStyle = style; }
301 {
return myFGDepthStyle; }
306 arr[0] = myImageMinUV[0];
307 arr[1] = myImageMinUV[1];
311 myImageMinUV[0] = arr[0];
312 myImageMinUV[1] = arr[1];
316 arr[0] = myImageMaxUV[0];
317 arr[1] = myImageMaxUV[1];
321 myImageMaxUV[0] = arr[0];
322 myImageMaxUV[1] = arr[1];
327 arr[0] = myRotoViews[view].myImageOffset[0];
328 arr[1] = myRotoViews[view].myImageOffset[1];
332 myRotoViews[view].myImageOffset[0] = arr[0];
333 myRotoViews[view].myImageOffset[1] = arr[1];
337 arr[0] = myRotoViews[view].myImageScale[0];
338 arr[1] = myRotoViews[view].myImageScale[1];
342 myRotoViews[view].myImageScale[0] = arr[0];
343 myRotoViews[view].myImageScale[1] = arr[1];
347 {
return myRotoViews[view].myBrightness; }
349 { myRotoViews[view].myBrightness = brightness; }
352 { myRotoViews[view].myAutoPlaceImage = onoff; }
354 {
return myRotoViews[view].myAutoPlaceImage; }
357 { myRotoViews[view].myEnvMapImage = onoff; }
359 {
return myRotoViews[view].myEnvMapImage; }
362 { myUseFixedImageRes = use_fixed; }
364 {
return myUseFixedImageRes; }
366 { myUseViewportRes = use_vp; }
368 {
return myUseViewportRes; }
372 myFixedImageRes.assign(w,h);
375 {
return myForLopsView ? myFixedImageRes :
UT_Vector2i(0,0); }
377 { myCurrentImageRes.assign(w,h); }
379 {
return myForLopsView ? myCurrentImageRes :
UT_Vector2i(0,0); }
381 { myImageResFraction =fraction; }
383 {
return myImageResFraction; }
395 { theHandleScale =
SYSclamp(v, 0.01
f, 1.0
f); }
399 void removeUserOption(
int option_id);
403 void refreshUserOptionVersions();
410 void setObjectLevel(
bool onoff);
431 GUI_DISP_STEREO_RIGHT
437 { myStereoPass = pass; }
439 {
return (myStereoPass == GUI_DISP_STEREO_BOTH ||
440 myStereoPass == GUI_DISP_STEREO_LEFT); }
442 {
return (myStereoPass == GUI_DISP_STEREO_BOTH ||
443 myStereoPass == GUI_DISP_STEREO_RIGHT); }
465 void setHeadlightIntensity(
fpreal i);
471 void setHeadlightSpecular(
bool use_spec);
483 { myShadowMapGenTime=
SYSmax(0.0,t); }
489 { myFlags.myFastHQIntLight = e; }
491 {
return myFlags.myFastHQIntLight; }
518 { myUniformFog.myFogColor =
c; }
525 {
return myUniformFog.myFogHeightMode; }
527 { myUniformFog.myFogHeightMode =
SYSclamp(m,-1,1); }
531 {
return myUniformFog.myFogFalloff; }
533 { myUniformFog.myFogFalloff =
f; }
535 { myUniformFog.myFogIntensity=
SYSmax(0.0,f); }
537 {
return myUniformFog.myFogIntensity; }
544 { myUniformFogClipDistance = d; }
546 {
return myUniformFogClipDistance; }
557 { myVolumeFog.myFogColor =
c; }
564 {
return myVolumeFog.myFogHeightMode; }
566 { myVolumeFog.myFogHeightMode =
SYSclamp(m,-1,1); }
570 {
return myVolumeFog.myFogFalloff; }
572 { myVolumeFog.myFogFalloff =
f; }
574 { myVolumeFog.myFogIntensity=
SYSmax(0.0,f); }
576 {
return myVolumeFog.myFogIntensity; }
579 { myVolumeFogQuality =
SYSclamp(q, 0,3); }
582 myVolumeFogScatterPara =
SYSmax(0.0, para);
583 myVolumeFogScatterPerp =
SYSmax(0.0, perp);
587 para = myVolumeFogScatterPara;
588 perp = myVolumeFogScatterPerp;
605 DEFAULT_MATERIAL_SIMPLE = 0,
606 DEFAULT_MATERIAL_MATCAP
608 void setDefaultMaterialType(DefaultMaterialType
type);
609 void setDefaultMatCapFile(
const UT_StringRef &tex_filepath);
610 void setDefaultMatCapIntensity(
fpreal intensity);
611 void setDefaultMaterialDiffuse(
UT_Color col);
612 void setDefaultMaterialSpecular(
UT_Color col);
613 void setDefaultMaterialAmbient(
UT_Color col);
614 void setDefaultMaterialEmission(
UT_Color col);
615 void setDefaultMaterialRoughness(
fpreal rough);
616 void setDefaultMaterialSpecRoughness(
fpreal srough);
619 {
return myDefaultMatType; }
621 {
return myDefaultMatCapFile; }
623 {
return myDefaultMatCapIntensity; }
630 {
return myDefaultSpecRough; }
642 int &max2d,
int &max3d)
const;
650 float myImageMinUV[2];
651 float myImageMaxUV[2];
653 fpreal myOriginGnomonSize;
654 int myHandleHighlightSize;
656 static float theHandleScale;
659 fpreal myHeadlightIntensity;
660 bool myHeadlightSpec;
668 fpreal myDefaultSpecRough;
669 bool myDefaultMaterialDirty;
671 DefaultMaterialType myDefaultMatType;
673 fpreal myDefaultMatCapIntensity;
674 bool myDefaultMatCapDirty;
676 fpreal myXRayWireStrength;
681 float myImageOffset[2];
682 float myImageScale[2];
690 FGDepthStyle myFGDepthStyle;
692 unsigned mySelectMask;
701 showCurrentOutput :1,
716 drawEnvironmentMaps :1,
717 drawFilteredBackgrounds:1,
718 drawVertexAttrib2D :1,
719 autoDetectAttribType2D:1,
721 showIKCriticalZones :1,
737 showForegroundImage :1,
738 useForegroundDepth :1,
745 unsigned isObjectLevel :1;
750 int myObjectMaterialLimit;
752 gui_StereoPass myStereoPass;
754 bool myLoadedDefaults;
755 exint myMSSUpdateSerial;
756 gui_MatAssignMode myMatAssignMode;
761 int myLightSampleLimit;
762 int myShadowMapMemMB;
763 fpreal myShadowMapGenTime;
768 fpreal myImageResFraction;
769 bool myUseFixedImageRes;
770 bool myUseViewportRes;
771 bool myCameraCropMask;
776 FogParms() : myFogColor(1.0,1.0,1.0), myFogDensity(1.0),
777 myFogOpacity(1.0), myFogStart(0.0), myFogEnd(1000.0),
778 myFogHeightMode(0), myFogHeight(100.0),
779 myFogIntensity(1.0), myFogFalloff(10.0)
791 FogParms myUniformFog;
792 fpreal myUniformFogClipDistance;
793 bool myUniformFogUseSun;
794 fpreal myUniformFogSunBloom;
796 FogParms myVolumeFog;
797 int myVolumeFogQuality;
798 fpreal myVolumeFogScatterPara;
799 fpreal myVolumeFogScatterPerp;
fpreal getUniformFogHeight() const
FGDepthStyle getForegroundDepthStyle() const
UI_Value & getObjectLevelNotify()
void drawObjectOrigins(bool org)
GLboolean GLboolean GLboolean b
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
GLenum GLenum GLenum GLenum GLenum scale
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
UT_Color getDefaultMaterialEmission() const
void drawStickyOrigin(bool onoff)
bool drawObjectOrigins() const
void getImageOffset(GUI_RotoView view, float arr[2]) const
GLenum const void GLuint GLint reference
void setVolumeFogOpacity(fpreal d)
fpreal getUniformFogSunBloom() const
const UT_StringRef & getForegroundDepthPlane() const
void setVolumeFogFalloff(fpreal f)
void drawYZPlane(bool onoff)
bool getHeadlightSpecular() const
void drawMultiTexture(bool onoff)
void setImageMinUV(float arr[2])
bool drawViewPivot() const
bool showNonSelected() const
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)
GLuint const GLchar * name
void handleHighlightSize(int hl)
void setVolumeFogDensity(fpreal d)
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)
bool getFastInteractiveHQLight() const
void setImageOffset(GUI_RotoView view, float arr[2])
int getLightSamplingLimit() const
void setDOFTexture(const UT_StringRef &tex)
exint getMSSUpdateSerial() const
bool getHeadlightHighQuality() const
GLubyte GLubyte GLubyte GLubyte w
GLdouble GLdouble GLdouble GLdouble q
UT_Vector3D getHeadlightDirection() const
void setUniformFogUseSun(bool d)
bool getUseViewportRes() const
void xrayWireStrength(fpreal w)
void showObjectNames(bool onoff)
fpreal getVolumeFogEnd() const
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
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)
GLboolean GLboolean GLboolean GLboolean 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
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)
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
GR_DisplayOption & operator[](GUI_DisplaySetType type)
void setBrightness(GUI_RotoView view, float brightness)
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
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)
OPUI_RotoscopeData * myRotoscopeData
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
const UT_StringRef & getForegroundImage()
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)
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