aboutsummaryrefslogtreecommitdiff
path: root/tools/ArtistTools/source/BlastPlugin/Parameters/HackNvParamBug.cpp
blob: 6017a75d221a3709d49293afa5c3f7fb4c971e0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <string.h>
#include "BlastProjectParameters.h"

int GetHackElementSize(const char* data)
{
	if (strstr(data, "graphicsMesh.materialAssignments") != nullptr)
		return sizeof(nvidia::parameterized::BlastProjectParametersNS::MaterialAssignments_Type);
	if (strstr(data, "graphicsMesh.positions") != nullptr)
		return sizeof(nvidia::NvVec3);
	if (strstr(data, "graphicsMesh.normals") != nullptr)
		return sizeof(nvidia::NvVec3);
	if (strstr(data, "graphicsMesh.texcoords") != nullptr)
		return sizeof(nvidia::NvVec2);
	if (strstr(data, "graphicsMesh.positionIndexes") != nullptr)
		return sizeof(int32_t);
	if (strstr(data, "graphicsMesh.normalIndexes") != nullptr)
		return sizeof(int32_t);
	if (strstr(data, "graphicsMesh.texcoordIndexes") != nullptr)
		return sizeof(int32_t);
	if (strstr(data, "graphicsMesh.materialIDs") != nullptr)
		return sizeof(int32_t);
	if (strstr(data, "filter.filters[0].depthFilters") != nullptr)
		return sizeof(uint32_t);
	return 0;
}