void UMaterialGraphNode::OnRenameNode(const FString& NewName)
{
	MaterialExpression->Modify();
	SetParameterName(NewName);
	MaterialExpression->MarkPackageDirty();
	MaterialDirtyDelegate.ExecuteIfBound();
}
Example #2
0
void CObjectEntry::Parse_XML_Document(XML_PARSER* pXmlParser)
{
    if(pXmlParser)
    {
        //*Attributes*
        //Index
        if(pXmlParser->Is_Having_Attribute(_T("Index")))
        {
            SetIndex(pXmlParser->Get_Attribute_Value());
        }

        //SubIndex
        if(pXmlParser->Is_Having_Attribute(_T("SubIndex")))
        {
            SetSubIndex(pXmlParser->Get_Attribute_Value());
        }

        //ParameterName
        if(pXmlParser->Is_Having_Attribute(_T("ParameterName")))
        {
            SetParameterName(pXmlParser->Get_Attribute_Value());
        }

        //ObjectType
        if(pXmlParser->Is_Having_Attribute(_T("ObjectType")))
        {
            SetObjectType(pXmlParser->Get_Attribute_Value());
        }

        //DataType
        if(pXmlParser->Is_Having_Attribute(_T("DataType")))
        {
            SetDataType(pXmlParser->Get_Attribute_Value());
        }

        //AccessType
        if(pXmlParser->Is_Having_Attribute(_T("AccessType")))
        {
            SetAccessType(pXmlParser->Get_Attribute_Value());
        }

        //Default
        if(pXmlParser->Is_Having_Attribute(_T("DefaultValue")))
        {
            SetDefaultValue(pXmlParser->Get_Attribute_Value());
        }

        //LowLimit
        if(pXmlParser->Is_Having_Attribute(_T("LowLimit")))
        {
            SetLowLimit(pXmlParser->Get_Attribute_Value());
        }

        //HighLimit
        if(pXmlParser->Is_Having_Attribute(_T("HighLimit")))
        {
            SetHighLimit(pXmlParser->Get_Attribute_Value());
        }

        //PDOMapping
        if(pXmlParser->Is_Having_Attribute(_T("PDOMapping")))
        {
            SetPDOMapping(pXmlParser->Get_Attribute_Value());
        }

        //ObjFlags
        if(pXmlParser->Is_Having_Attribute(_T("ObjFlags")))
        {
            SetObjFlags(pXmlParser->Get_Attribute_Value());
        }
    }
}
Example #3
0
DWORD FFGLPluginDef::InitPluginLibrary()
{
    DWORD rval = FF_FAIL;

    if (m_mainfunc==NULL) {
		DEBUGPRINT(("HEY!  m_mainfunc is NULL in InitPluginLibrary!?"));
        return rval;
	}

    //initialize the plugin
    rval = m_mainfunc(FF_INITIALISE,0,0).ivalue;
    if (rval!=FF_SUCCESS)
        return rval;

    //get the parameter names
    m_numparams = (int)m_mainfunc(FF_GETNUMPARAMETERS, 0, 0).ivalue;

    m_paramdefs = new FFGLParameterDef[m_numparams];
	// DEBUGPRINT(("----- MALLOC new FFGLParameterDef"));
    int n;
    for (n=0; n<m_numparams; n++) {

        plugMainUnion u = m_mainfunc(FF_GETPARAMETERNAME,(DWORD)n,0);

        if (u.ivalue!=FF_FAIL && u.svalue!=NULL) {
            //create a temporary copy as a cstring w/null termination
            char newParamName[32];

            const char *c = u.svalue;
            char *t = newParamName;

            //FreeFrame spec defines parameter names to be 16 characters long MAX
            int numChars = 0;
            while (*c && numChars<16) {
                *t = *c;
                t++;
                c++;
                numChars++;
            }

            //make sure there's a null at the end
            *t = 0;

            FFGLParameterDef* p;
            p = SetParameterName(n, newParamName);
            u = m_mainfunc(FF_GETPARAMETERTYPE,(DWORD)n,0);
            p->type = u.ivalue;
	        u = m_mainfunc(FF_GETPARAMETERDEFAULT,(DWORD)n,0);
            if ( p->type != FF_TYPE_TEXT ) {
                p->default_float_val = u.fvalue;
	            DEBUGPRINT1(("Float Parameter n=%d s=%s type=%d default=%lf\n",
	                     n,p->name.c_str(),p->type,p->default_float_val));
            } else {
                p->default_string_val = CopyFFString16(u.svalue);
	            DEBUGPRINT1(("String Parameter n=%d s=%s",n,p->name.c_str()));
            }
			p->num = n;
        }
        else
        {
            SetParameterName(n, "Untitled");
        }
    }

    return FF_SUCCESS;
}
Example #4
0
DWORD FFGLPluginInstance::InitPluginLibrary()
{
    DWORD rval = FF_FAIL;

    if (m_ffPluginMain==NULL)
        return rval;

    //initialize the plugin
    rval = m_ffPluginMain(FF_INITIALISE,0,0).ivalue;
    if (rval!=FF_SUCCESS)
        return rval;

    //get the parameter names
    m_numParameters = (int)m_ffPluginMain(FF_GETNUMPARAMETERS, 0, 0).ivalue;

    m_params = new FFGLParameterStruct[m_numParameters];
    int i;
    for (i=0; i<m_numParameters; i++)
    {

        plugMainUnion u = m_ffPluginMain(FF_GETPARAMETERNAME,(DWORD)i,0);

        if (u.ivalue!=FF_FAIL && u.svalue!=NULL)
        {
            //create a temporary copy as a cstring w/null termination
            char newParamName[32];

            const char *c = u.svalue;
            char *t = newParamName;

            //FreeFrame spec defines parameter names to be 16 characters long MAX
            int numChars = 0;
            while (*c && numChars<16)
            {
                *t = *c;

                t++;
                c++;

                numChars++;
            }

            //make sure there's a null at the end
            *t = 0;

            FFGLParameterStruct* p;
            p = SetParameterName(i, newParamName);
            u = m_ffPluginMain(FF_GETPARAMETERTYPE,(DWORD)i,0);
            p->type = u.ivalue;
            u = m_ffPluginMain(FF_GETPARAMETERDEFAULT,(DWORD)i,0);
            if ( p->type != FF_TYPE_TEXT ) {
                p->default_float_val = u.fvalue;
            } else {
                p->default_string_val = CopyFFString16(u.svalue);
            }
        }
        else
        {
            SetParameterName(i, "Untitled");
        }
    }

    return FF_SUCCESS;
}