Skip to content

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

@Neograph734

Description

@Neograph734

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions