Created
November 11, 2012 10:56
-
-
Save aras-p/4054545 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CUSTOM_PROP String[] shaderKeywords { | |
const Material::ShaderKeywordsT& kw = self->GetShaderKeywords (); | |
const size_t count = kw.size(); | |
ScriptingArrayPtr array = CreateScriptingArray<ScriptingStringPtr> (GetScriptingManager().GetCommonClasses().string, count); | |
for (int i = 0; i < count; ++i) | |
{ | |
SetScriptingArrayElement<ScriptingStringPtr>(array,i,CreateScriptingString(kw[i])); | |
} | |
return array; | |
} | |
{ | |
Material::ShaderKeywordsT names; | |
const int size = GetScriptingArraySize (value); | |
for (int i = 0; i < size; ++i) | |
names.push_back (ScriptingStringToCpp (GetScriptingArrayElementNoRef<ScriptingStringPtr> (value, i))); | |
self->SetShaderKeywords (names); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment