int MaterialMixer::Interface (int version, LWInterface *local, void *serverdata) { static LWXPanelControl ctrl[] = { {MDiff, "Diffuse Mode", "iPopChoice"}, {BDiff, "Diffuse Opacity", "percent-env"}, {MSpec, "Specular Mode", "iPopChoice"}, {BSpec, "Specular Opacity", "percent-env"}, {MRefl, "Reflection Mode", "iPopChoice"}, {BRefl, "Reflection Opacity", "percent-env"}, {MRefr, "Refraction Mode", "iPopChoice"}, {BRefr, "Refraction Opacity", "percent-env"}, {MTran, "Transparency Mode", "iPopChoice"}, {BTran, "Transparency Opacity", "percent-env"}, 0 }; static LWXPanelDataDesc desc[] = { {MDiff, "Diffuse Mode", "integer"}, {BDiff, "Diffuse Opacity", "float-env"}, {MSpec, "Specular Mode", "integer"}, {BSpec, "Specular Opacity", "float-env"}, {MRefl, "Reflection Mode", "integer"}, {BRefl, "Reflection Opacity", "float-env"}, {MRefr, "Refraction Mode", "integer"}, {BRefr, "Refraction Opacity", "float-env"}, {MTran, "Transparency Mode", "integer"}, {BTran, "Transparency Opacity", "float-env"}, }; static LWXPanelHint hints[] = { XpSTRLIST(MDiff, blendModeS), XpSTRLIST(MSpec, blendModeS), XpSTRLIST(MRefl, blendModeS), XpSTRLIST(MRefr, blendModeS), XpSTRLIST(MTran, blendModeS), XpDIVADD(BDiff), XpDIVADD(BSpec), XpDIVADD(BRefl), XpDIVADD(BRefr), XpEND, }; CreateViewXPanel (ctrl, desc, hints); local->panel = LW_XPanel.getID(); return AFUNC_OK; }
/* ====================================================================== Interface() XPanels Interface. Called when the user presses the "Options" button. ====================================================================== */ int Atmosphere::Interface( int version, LWInterface *local, void *serverData ) { UNUSED(serverData); UNUSED(version); if ( !txedf ) return AFUNC_BADGLOBAL; LWXPanelHint hint[] = { XpLABEL( 0, "VFog Settings" ), XpBUTNOTIFY( ID_TXBT, XPanelInterface::LWXPanelBtnClickFunc ), XpSTRLIST( ID_RES, quality ), XpSTRLIST( ID_MARCH, render ), XpGROUP_( ID_GGRP ), XpH( ID_HI ), XpH( ID_LO ), XpH( ID_FA ), XpH( ID_DEN ), XpEND, XpGROUP_( ID_SGRP ), XpH( ID_LUM ), XpH( ID_OPA ), XpH( ID_BCK ), XpH( ID_COL ), XpEND, XpGROUP_( ID_RGRP ), XpH( ID_RES ), XpH( ID_TXTR ), XpH( ID_TXBT ), XpEND, XpENABLE_( ID_MARCH ), XpH( ID_RGRP ), XpEND, XpENABLE_MAP_( ID_BCK, bckMap ), XpH( ID_COL ), XpEND, XpMIN( ID_LUM, 0 ), XpMAX( ID_LUM, 1 ), XpMIN( ID_OPA, 0 ), XpMAX( ID_OPA, 1 ), XpMIN( ID_FA, 0 ), XpMAX( ID_FA, 1 ), XpEND }; // end hint[] CreateViewXPanel (ctrl_list, data_descrip, hint); // FINE because the callback it is in our class LW_XPanel.setUserData(this, ID_TXBT); local->panel = LW_XPanel.getID(); local->options = NULL; local->command = NULL; return AFUNC_OK; }
/* ====================================================================== Interface() ====================================================================== */ int hotdm::Interface( long version, LWInterface *local, void *serverData ) { UNUSED(version); UNUSED(serverData); static LWXPanelControl ctrl[] = { {ID_RESO, "Resolution", "iSliderText"}, {ID_GLSC, "Global Scale", "distance-env"}, {ID_WAVH, "Wave Height", "distance-env"}, {ID_SWAV, "Shortest Wave", "distance-env"}, {ID_DCHP, "Use Choppiness", "iBoolean"}, {ID_CHOP, "Choppiness", "distance-env"}, {ID_WSPD, "Wind Speed (m/s)", "float-env"}, {ID_WDIR, "Wind Direction (º)", "angle-env"}, {ID_WALG, "Wind Align", "float-env"}, {ID_DREF, "Damp Reflections", "float-env"}, {ID_ODEP, "Ocean Depth", "distance-env"}, {ID_SEED, "Seed", "integer"}, {ID_INTP, "Catmull-Rom Interpolation", "iBoolean"}, {ID_PRES, "Presets", "vPopCmd"}, /* This DOESNT work for displacement plugins, But left the code to see how other controls can be done */ // {ID_NORM, "Do Normals", "iBoolean"}, // {ID_JACB, "Jacobian", "iBoolean"}, { 0 } }; static LWXPanelDataDesc desc[] = { {ID_RESO, "Resolution", "integer"}, {ID_GLSC, "Global Scale", "distance-env"}, {ID_WAVH, "Wave Height", "distance-env"}, {ID_SWAV, "Shortest Wave", "distance-env"}, {ID_DCHP, "Use Choppiness", "integer"}, {ID_CHOP, "Choppiness", "distance-env"}, {ID_WSPD, "Wind Speed (m/s)", "float-env"}, {ID_WDIR, "Wind Direction (º)", "angle-env"}, {ID_WALG, "Wind Align", "float-env"}, {ID_DREF, "Damp Reflections", "float-env"}, {ID_ODEP, "Ocean Depth", "distance-env"}, {ID_SEED, "Seed", "integer"}, {ID_INTP, "Catmull-Rom Interpolation", "integer"}, {ID_PRES, "Presets", "integer"}, /* This DOESNT work for displacement plugins, But left the code to see how other controls can be done */ // {ID_NORM, "Do Normals", "integer"}, // {ID_JACB, "Jacobian", "integer"}, { 0 } }; static LWXPanelHint hints[] = { XpLABEL( 0, "HOT Ocean Toolkit" ), // Enable Use Choppiness and Chopinnes controls XpENABLE_(ID_DCHP),XpH(ID_CHOP),XpEND, /* This DOESNT work for displacement plugins, But left the code to see how other controls can be done */ // XpENABLE_MAP_(ID_DCHP, nrm_map), XpH(ID_NORM),XpEND, XpDIVADD( ID_GLSC ), //Separator after Global Scale XpDIVADD( ID_SWAV ), XpDIVADD( ID_CHOP ), XpDIVADD( ID_WALG ), XpDIVADD( ID_ODEP ), XpDIVADD( ID_INTP ), XpMIN( ID_RESO, 1 ), // Resolution XpMAX( ID_RESO, 12 ), XpSTEP( ID_RESO, 1 ), XpMIN( ID_GLSC, 0 ), // Global Scale XpMAX( ID_GLSC, 5000000 ), XpSTEP( ID_GLSC, 1 ), XpMIN( ID_WAVH, 0 ), // Wave Height XpMAX( ID_WAVH, 5000 ), XpSTEP( ID_WAVH, 1 ), XpMIN( ID_SWAV, 0 ), // Shortest Wave XpMAX( ID_SWAV, 500 ), XpSTEP( ID_SWAV, 1 ), XpMIN( ID_CHOP, 0 ), // Choppiness XpMAX( ID_CHOP, 50 ), XpSTEP( ID_CHOP, 1 ), XpMIN( ID_WSPD, 0 ), // Wind Speed XpMAX( ID_WSPD, 50000 ), XpSTEP( ID_WSPD, 1 ), XpMIN( ID_WALG, 0 ), // Wind Align XpMAX( ID_WALG, 10 ), XpSTEP( ID_WALG, 1 ), XpMIN( ID_DREF, 0 ), // Damp Reflections XpMAX( ID_DREF, 1 ), XpSTEP( ID_DREF, 1 ), XpMIN( ID_ODEP, 0 ), // Ocean Depth XpMAX( ID_ODEP, 50000 ), XpSTEP( ID_ODEP, 1 ), XpEND }; // end hint[] CreateViewXPanel (ctrl, desc, hints); Preset.Setup(LW_XPanel, ID_PRES); local->panel = LW_XPanel.getID(); return AFUNC_OK; }