RefResult TriPatchObject::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: PatchMeshInvalid(); if (editOb==this) InvalidateUI(); break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; gpd->dim = GetParameterDim(gpd->index); return REF_STOP; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; gpn->name = GetParameterName(gpn->index); return REF_STOP; } } return(REF_SUCCEED); }
RefResult ExtrudeMod::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message ) { switch (message) { case REFMSG_CHANGE: if ((editMod==this) && pmapParam) pmapParam->Invalidate(); break; case REFMSG_GET_PARAM_DIM: { GetParamDim *gpd = (GetParamDim*)partID; gpd->dim = GetParameterDim(gpd->index); return REF_HALT; } case REFMSG_GET_PARAM_NAME: { GetParamName *gpn = (GetParamName*)partID; gpn->name = GetParameterName(gpn->index); return REF_HALT; } } return(REF_SUCCEED); }
BOOL CObjectEntry::StoreObjectDictionarySchema(XML_PARSER* pXmlParser) { CStdString strIndex = ""; CStdString strSubIndex = ""; CStdString strParameterName = ""; CStdString strObjectType = ""; CStdString strDataType = ""; CStdString strAccessType = ""; CStdString strLowLimit = ""; CStdString strHighLimit = ""; CStdString strDefaultValue = ""; CStdString strPDOMapping = ""; CStdString strObjFlags = ""; if(pXmlParser) { //ObjectEntry pXmlParser->AddNewLineTab(); pXmlParser->Add_LastChildNode(_T("ObjectEntry")); pXmlParser->IncTabLevel(); //Prepare Attributes GetIndex(strIndex); GetSubIndex(strSubIndex); GetParameterName(strParameterName); GetObjectType(strObjectType); GetDataType(strDataType, FALSE); GetAccessType(strAccessType); GetLowLimit(strLowLimit); GetHighLimit(strHighLimit); GetDefaultValue(strDefaultValue); GetPDOMapping(strPDOMapping); GetObjFlags(strObjFlags); //ObjectEntry Attributes pXmlParser->Set_Attribute(_T("Index"), strIndex); pXmlParser->Set_Attribute(_T("SubIndex"), strSubIndex); pXmlParser->Set_Attribute(_T("ParameterName"), strParameterName); pXmlParser->Set_Attribute(_T("ObjectType"), strObjectType); pXmlParser->Set_Attribute(_T("DataType"), strDataType); pXmlParser->Set_Attribute(_T("AccessType"), strAccessType); if(!strLowLimit.IsEmpty()) pXmlParser->Set_Attribute(_T("LowLimit"), strLowLimit); if(!strHighLimit.IsEmpty()) pXmlParser->Set_Attribute(_T("HighLimit"), strHighLimit); if(!strDefaultValue.IsEmpty()) pXmlParser->Set_Attribute(_T("DefaultValue"), strDefaultValue); if(!strPDOMapping.IsEmpty()) pXmlParser->Set_Attribute(_T("PDOMapping"), strPDOMapping); if(!strObjFlags.IsEmpty()) pXmlParser->Set_Attribute(_T("ObjFlags"), strObjFlags); //End ObjectEntry pXmlParser->DecTabLevel(); pXmlParser->AddNewLineTab(); pXmlParser->Go_to_Parent(); return TRUE; } return FALSE; }
/* * Overloaded function to find parameter by it's ID * @param iParamID - in, ID of the parameter to be found * @return - true if parameter was found in internal container, false otherwise */ bool CConfigurationModule::IsParameterPresent(int iParamID) { try { std::string strParamName = GetParameterName(iParamID); if (!strParamName.empty()) return IsParameterPresent(strParamName.c_str()); } CATCH return false; }
FText UMaterialGraphNode::GetNodeTitle(ENodeTitleType::Type TitleType) const { TArray<FString> Captions; MaterialExpression->GetCaption(Captions); if (TitleType == ENodeTitleType::EditableTitle) { return FText::FromString(GetParameterName()); } else if (TitleType == ENodeTitleType::ListView || TitleType == ENodeTitleType::MenuTitle) { return FText::FromString(MaterialExpression->GetClass()->GetDescription()); } else { // More useful to display multi line parameter captions in reverse order // TODO: May have to choose order based on expression type if others need correct order int32 CaptionIndex = Captions.Num() -1; FTextBuilder NodeTitle; NodeTitle.AppendLine(Captions[CaptionIndex]); for (; CaptionIndex > 0; ) { CaptionIndex--; NodeTitle.AppendLine(Captions[CaptionIndex]); } if ( MaterialExpression->bShaderInputData && (MaterialExpression->bHidePreviewWindow || MaterialExpression->bCollapsed)) { if (MaterialExpression->IsA<UMaterialExpressionTextureProperty>()) { NodeTitle.AppendLine(LOCTEXT("TextureProperty", "Texture Property")); } else if (MaterialExpression->IsA<UMaterialExpressionViewProperty>()) { NodeTitle.AppendLine(LOCTEXT("ViewProperty", "View Property")); } else { NodeTitle.AppendLine(LOCTEXT("InputData", "Input Data")); } } if (bIsPreviewExpression) { NodeTitle.AppendLine(); NodeTitle.AppendLine(LOCTEXT("PreviewExpression", "Previewing")); } return NodeTitle.ToText(); } }
FString UMaterialGraphNode::GetNodeTitle(ENodeTitleType::Type TitleType) const { TArray<FString> Captions; MaterialExpression->GetCaption(Captions); if (TitleType == ENodeTitleType::EditableTitle) { return GetParameterName(); } else if (TitleType == ENodeTitleType::ListView) { return MaterialExpression->GetClass()->GetDescription(); } else { // More useful to display multi line parameter captions in reverse order // TODO: May have to choose order based on expression type if others need correct order int32 CaptionIndex = Captions.Num() -1; FString NodeTitle = Captions[CaptionIndex]; for (; CaptionIndex > 0; ) { CaptionIndex--; NodeTitle += TEXT("\n"); NodeTitle += Captions[CaptionIndex]; } if ( MaterialExpression->bShaderInputData && (MaterialExpression->bHidePreviewWindow || MaterialExpression->bCollapsed)) { NodeTitle += TEXT("\nInput Data"); } if (bIsPreviewExpression) { NodeTitle += LOCTEXT("PreviewExpression", "\nPreviewing").ToString(); } return NodeTitle; } }
RefResult RelaxMod::NotifyRefChanged(const Interval& changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message, BOOL propagate ) { GetParamDim *gpd; GetParamName *gpn; switch (message) { case REFMSG_CHANGE: if (editMod==this && pmapParam) pmapParam->Invalidate(); break; case REFMSG_GET_PARAM_DIM: gpd = (GetParamDim*)partID; gpd->dim = defaultDim; return REF_HALT; case REFMSG_GET_PARAM_NAME: gpn = (GetParamName*)partID; gpn->name = GetParameterName(gpn->index); return REF_HALT; } return(REF_SUCCEED); }
const char* csTerrainModifiableDataFeederProperties::GetParameterValue (size_t index) { return GetParameterValue (GetParameterName (index)); }