aboutsummaryrefslogtreecommitdiff
path: root/tools/ArtistTools/source/BlastPlugin/Parameters/HackNvParamBug.cpp
blob: 5cd0a32cfb6f28859da04d3cc5e98b0ab64c6300 (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
26
27
#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.tangents") != 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;
}