本文整理汇总了C++中MFnMessageAttribute::setConnectable方法的典型用法代码示例。如果您正苦于以下问题:C++ MFnMessageAttribute::setConnectable方法的具体用法?C++ MFnMessageAttribute::setConnectable怎么用?C++ MFnMessageAttribute::setConnectable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MFnMessageAttribute
的用法示例。
在下文中一共展示了MFnMessageAttribute::setConnectable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize
MStatus mtmEnvLight::initialize()
{
MFnTypedAttribute tAttr;
MFnNumericAttribute nAttr;
MFnLightDataAttribute lAttr;
MFnEnumAttribute eAttr;
MFnMessageAttribute mAttr;
MStatus stat;
//aColor = nAttr.createColor( "color", "c" );
//CHECK_MSTATUS ( nAttr.setKeyable(true) );
//CHECK_MSTATUS ( nAttr.setStorable(true) );
//CHECK_MSTATUS ( nAttr.setDefault(0.0f, 0.58824f, 0.644f) );
aLightColor = nAttr.createColor( "lightColor", "lightColor" );
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
nAttr.setDefault(0.7f, 0.58824f, 0.344f);
aShadowColor = nAttr.createColor( "shadowColor", "sc" );
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
CHECK_MSTATUS ( nAttr.setDefault(0.0f, 0.0f, 0.0f) );
aPosition = nAttr.createPoint( "position", "pos" );
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
aInputDirection = nAttr.createPoint( "inputDirection", "id" );
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
CHECK_MSTATUS ( nAttr.setDefault(-1.0f, 0.0f, 0.0f) );
aInputAmbient = nAttr.create( "ambientOn", "an", MFnNumericData::kBoolean);
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
CHECK_MSTATUS ( nAttr.setHidden(false) );
CHECK_MSTATUS ( nAttr.setDefault(true) );
aInputDiffuse = nAttr.create( "emitDiffuse", "dn", MFnNumericData::kBoolean);
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
CHECK_MSTATUS ( nAttr.setHidden(false) );
CHECK_MSTATUS ( nAttr.setDefault(true) );
aInputSpecular = nAttr.create( "emitSpecular", "sn", MFnNumericData::kBoolean);
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
CHECK_MSTATUS ( nAttr.setHidden(false) );
CHECK_MSTATUS ( nAttr.setDefault(true) );
aIntensity = nAttr.create( "intensity", "i", MFnNumericData::kFloat);
CHECK_MSTATUS ( nAttr.setKeyable(true) );
CHECK_MSTATUS ( nAttr.setStorable(true) );
CHECK_MSTATUS ( nAttr.setHidden(false) );
CHECK_MSTATUS ( nAttr.setDefault(1.0f) );
samplingquality = nAttr.create( "samplingquality", "samplingquality", MFnNumericData::kFloat, 1.0);
envmap = tAttr.create( "envmap", "envmap", MFnNumericData::kString);
tAttr.setUsedAsFilename(true);
areamap = tAttr.create( "areamap", "areamap", MFnNumericData::kString);
tAttr.setUsedAsFilename(true);
areafullsphere = nAttr.create( "areafullsphere", "areafullsphere", MFnNumericData::kBoolean, true);
envintensity = nAttr.createColor( "envintensity", "envintensity" );
nAttr.setDefault(1.0f, 1.0f, 1.0f);
raybackground = nAttr.create( "raybackground", "raybackground", MFnNumericData::kBoolean, false);
castshadow = nAttr.create( "castshadow", "castshadow", MFnNumericData::kBoolean, true);
envtype = eAttr.create( "envtype", "envtype", 0, &stat);
stat = eAttr.addField( "Direct Lighting", 0 );
stat = eAttr.addField( "Ambient Occlusion", 1 );
stat = eAttr.addField( "Full Irradiance", 2 );
stat = eAttr.addField( "Raytrace Background", 3 );
eAttr.setDefault(0);
doraysamples = nAttr.create( "doraysamples", "doraysamples", MFnNumericData::kBoolean, false);
doadaptive = nAttr.create( "doadaptive", "doadaptive", MFnNumericData::kBoolean, false);
domaxdist = nAttr.create( "domaxdist", "domaxdist", MFnNumericData::kBoolean, false);
maxdist = nAttr.create( "maxdist", "maxdist", MFnNumericData::kFloat, 10.0);
coneangle = nAttr.create( "coneangle", "coneangle", MFnNumericData::kFloat, 45.0);
envtint = nAttr.createColor( "envtint", "envtint" );
nAttr.setDefault(1.0f, 1.0f, 1.0f);
shadowI = nAttr.create( "shadowI", "shadowI", MFnNumericData::kFloat, 1.0);
samples = nAttr.create( "samples", "samples", MFnNumericData::kInt, 32);
MFnStringData fnStringData;
MObject defaultObjectMask;
defaultObjectMask = fnStringData.create( "*" );
objectmask = tAttr.create( "objectmask", "objectmask", MFnNumericData::kString, defaultObjectMask);
usePortalGeometry = nAttr.create( "usePortalGeometry", "usePortalGeometry", MFnNumericData::kBoolean, false);
portalGeometry = mAttr.create( "portalGeometry", "portalGeometry");
mAttr.setConnectable(true);
mAttr.accepts(MFnData::kAny);
// Outputs
aLightDirection = nAttr.createPoint( "lightDirection", "ld" );
CHECK_MSTATUS ( nAttr.setStorable(false) );
CHECK_MSTATUS ( nAttr.setHidden(true) );
CHECK_MSTATUS ( nAttr.setReadable(true) );
CHECK_MSTATUS ( nAttr.setWritable(false) );
CHECK_MSTATUS ( nAttr.setDefault(-1.0f, 0.0f, 0.0f) );
//.........这里部分代码省略.........