Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dForce material property numeric values are exported as strings instead of numbers #9

Open
Neograph734 opened this issue Jul 28, 2024 · 0 comments

Comments

@Neograph734
Copy link

dForce material property numeric values are exported as strings instead of numbers. This is confusing because for shader material properties, the numbers are not exported as strings.

Material section:

	"Materials" : [
		{
			"Version" : 4,
			...
			
			"Properties" : [
				{
					"Name" : "UV Set",
					"Label" : "UV Set",
					"Value" : 0, 		<----- HERE
					"Data Type" : "Double",
					"Texture" : ""
				},
				{
					"Name" : "Smooth On",
					"Label" : "Smooth",
					"Value" : 1, 		<----- HERE
					"Data Type" : "Double",
					"Texture" : ""
				},

dForce section in same export:

	"dForce" : [
		{
			"Version" : 4,
			...
			
			"dForce-Materials" : [
				{
					"Version" : 3,
					...

					"Properties" : [
						{
							"Name" : "Visible in Simulation",
							"Value" : "1", 		<----- HERE
							"Data Type" : "Double",
							"Texture" : ""
						},
						{
							"Name" : "Friction",
							"Value" : "0.4", 	<----- HERE
							"Data Type" : "Double",
							"Texture" : ""
						},

I suspect it is because of the QString in DzBridgeAction::writeDforceMaterialProperties() permalink:

Writer.addMember("Value", QString::number(NumericProperty->getDoubleValue()));

This is not happening in DzBridgeAction::writeMaterialProperty() permalink:

dtuPropNumericValue = NumericProperty->getDoubleValue();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant