Skip to content

Commit 2efaffa

Browse files
committed
don't export light custom properties
+ scale light range
1 parent 6ee3b5d commit 2efaffa

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -899,23 +899,11 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
899899
break;
900900
}
901901
}
902-
903-
// Export bounceIntensity as custom property
904-
// NOTE: export on fbxNode so that it will show up in Maya
905-
ExportFloatProperty (fbxNode, unityLight.bounceIntensity,
906-
MakeName("bounceIntensity"),
907-
"The multiplier that defines the strength of the bounce lighting.");
908-
909902
// The color of the light.
910903
var unityLightColor = unityLight.color;
911904

912905
fbxLight.Color.Set (new FbxDouble3(unityLightColor.r, unityLightColor.g, unityLightColor.b));
913906

914-
// Export colorTemperature as custom property
915-
ExportFloatProperty (fbxNode, unityLight.colorTemperature,
916-
MakeName("colorTemperature"),
917-
"The color temperature of the light. Correlated Color Temperature (abbreviated as CCT) is multiplied with the color filter when calculating the final color of a light source.The color temperature of the electromagnetic radiation emitted from an ideal black body is defined as its surface temperature in Kelvin.White is 6500K according to the D65 standard. Candle light is 1800K.If you want to use lightsUseCCT, lightsUseLinearIntensity has to be enabled to ensure physically correct output. See Also: GraphicsSettings.lightsUseLinearIntensity, GraphicsSettings.lightsUseCCT.");
918-
919907
// TODO: commandBufferCount Number of command buffers set up on this light (Read Only).
920908

921909
// cookie The cookie texture projected by the light.
@@ -937,11 +925,6 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
937925
}
938926
}
939927

940-
// Export cookieSize as custom property
941-
ExportFloatProperty (fbxNode, unityLight.cookieSize,
942-
MakeName("cookieSize"),
943-
"The size of a directional light's cookie.");
944-
945928
// TODO: cullingMask This is used to light certain objects in the scene selectively.
946929
// TODO: flare The flare asset to use for this light.
947930

@@ -955,7 +938,7 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
955938
// applies-to: Point & Spot
956939
// => FarAttenuationStart, FarAttenuationEnd
957940
fbxLight.FarAttenuationStart.Set (0.01f /* none zero start */);
958-
fbxLight.FarAttenuationEnd.Set(unityLight.range);
941+
fbxLight.FarAttenuationEnd.Set(unityLight.range*UnitScaleFactor);
959942

960943
// TODO: renderMode How to render the light.
961944

@@ -1014,26 +997,6 @@ bool ExportColorProperty (FbxObject fbxObject, Color value, string name, string
1014997
return true;
1015998
}
1016999

1017-
/// <summary>
1018-
/// Export Unity Property as a Float Property
1019-
/// </summary>
1020-
FbxProperty ExportFloatProperty (FbxObject fbxObject, float value, string name, string label )
1021-
{
1022-
// add (not particularly useful) custom data: how many Unity
1023-
// components does the unity object have?
1024-
var fbxProperty = FbxProperty.Create (fbxObject, Globals.FbxDoubleDT, name, label);
1025-
if (!fbxProperty.IsValid ()) {
1026-
throw new System.NullReferenceException ();
1027-
}
1028-
fbxProperty.Set (value);
1029-
1030-
// Must be marked user-defined or it won't be shown in most DCCs
1031-
fbxProperty.ModifyFlag (FbxPropertyFlags.EFlags.eUserDefined, true);
1032-
fbxProperty.ModifyFlag (FbxPropertyFlags.EFlags.eAnimatable, true);
1033-
1034-
return fbxProperty;
1035-
}
1036-
10371000
/// <summary>
10381001
/// Export Component's int property
10391002
/// </summary>

0 commit comments

Comments
 (0)