{
struct KzuPropertyType* UV_SET;
struct KzcVector4 uvs;
//get property type
UV_SET = kzuPropertyRegistryFindPropertyType("uv_modify");
kzsAssert(kzcIsValidPointer(UV_SET));
//get property
uvs = kzuObjectNodeGetVector4PropertyDefault(textrue_font->planeNode, UV_SET);
uvs.data[0] = (kzFloat)(uv_sets[index].x);
uvs.data[1] = (kzFloat)(uv_sets[index].y);
uvs.data[2] = (kzFloat)(uv_sets[index].z);
uvs.data[3] = (kzFloat)(uv_sets[index].w);
//set property
result = kzuObjectNodeSetVector4Property(textrue_font->planeNode, UV_SET, uvs);
kzsErrorForward(result);
}
在scene node底下的mesh的material,可以從node就直接get property來set,不用去get它的material
2014年9月4日 星期四
取得/設定 custom property
訂閱:
張貼留言
(
Atom
)
沒有留言 :
張貼留言