public FbxCamera GetRightCamera() { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxCameraStereo_GetRightCamera(swigCPtr); FbxCamera ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxCamera(cPtr, false); return(ret); }
public FbxCamera GetCameraProducerBottom() { global::System.IntPtr cPtr = FbxWrapperNativePINVOKE.FbxGlobalCameraSettings_GetCameraProducerBottom(swigCPtr); FbxCamera ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxCamera(cPtr, false); return(ret); }
public FbxCamera GetCameraProducerPerspective() { global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxGlobalCameraSettings_GetCameraProducerPerspective(swigCPtr); FbxCamera ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxCamera(cPtr, false); return(ret); }
/// <summary> /// Configure FbxCameras from GameCamera /// </summary> private static void ConfigureGameCamera(FbxCamera fbxCamera, Camera unityCamera) { // Configure FilmBack settings as a 35mm TV Projection (0.816 x 0.612) float aspectRatio = unityCamera.aspect; float apertureHeightInInches = 0.612f; float apertureWidthInInches = aspectRatio * apertureHeightInInches; FbxCamera.EProjectionType projectionType = unityCamera.orthographic ? FbxCamera.EProjectionType.eOrthogonal : FbxCamera.EProjectionType.ePerspective; fbxCamera.ProjectionType.Set(projectionType); fbxCamera.FilmAspectRatio.Set(aspectRatio); fbxCamera.SetApertureWidth(apertureWidthInInches); fbxCamera.SetApertureHeight(apertureHeightInInches); fbxCamera.SetApertureMode(FbxCamera.EApertureMode.eVertical); // Focal Length double focalLength = fbxCamera.ComputeFocalLength(unityCamera.fieldOfView); fbxCamera.FocalLength.Set(focalLength); // Field of View fbxCamera.FieldOfView.Set(unityCamera.fieldOfView); // NearPlane fbxCamera.SetNearPlane(unityCamera.nearClipPlane.Meters().ToCentimeters()); // FarPlane fbxCamera.SetFarPlane(unityCamera.farClipPlane.Meters().ToCentimeters()); return; }
public FbxCamera GetLeftCamera() { global::System.IntPtr cPtr = fbx_wrapperPINVOKE.FbxCameraStereo_GetLeftCamera(swigCPtr); FbxCamera ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxCamera(cPtr, false); return(ret); }
public bool Equals(FbxCamera other) { if (object.ReferenceEquals(other, null)) { return(false); } return(this.swigCPtr.Handle.Equals(other.swigCPtr.Handle)); }
public void FbxCamera_Create_HasNamespacePrefix() { // given: var obj = new FbxCamera("asdf"); // then: Assert.AreEqual("NodeAttribute::", obj.GetNameSpacePrefix()); }
static FbxObject CreateFbxObject(FbxCamera mesh, Matrix4x4 transform, FbxObjectManager ObjectManager, FbxConnectionManager ConnectionManager) { var Name = "Model::" + mesh.Name; FbxObject Object; Object = ObjectManager.CreateObject("Model", Name); var Model = Object.Definition; Model.AddValue(Object.Ident); Model.AddValue(Name); Model.AddValue("Camera"); Model.AddProperty("Version", 232); var Properties = Model.AddProperty("Properties70"); var DefaultAttributeIndex = Properties.AddProperty("P"); DefaultAttributeIndex.AddValue("DefaultAttributeIndex"); DefaultAttributeIndex.AddValue("int"); DefaultAttributeIndex.AddValue("Integer"); DefaultAttributeIndex.AddValue(""); DefaultAttributeIndex.AddValue(0); var LclTranslation = Properties.AddProperty("P"); LclTranslation.AddValue("Lcl Translation"); LclTranslation.AddValue(""); LclTranslation.AddValue("A+"); LclTranslation.AddValue(Vector3.zero); var LclRotation = Properties.AddProperty("P"); LclRotation.AddValue("Lcl Rotation"); LclRotation.AddValue(""); LclRotation.AddValue("A+"); LclRotation.AddValue(Vector3.zero); var LclScaling = Properties.AddProperty("P"); LclScaling.AddValue("Lcl Scaling"); LclScaling.AddValue(""); LclScaling.AddValue("A+"); LclScaling.AddValue(Vector3.one); // need a camera attrib and need it connected var CameraAttrib = new NodeAttribute(mesh.Name); var AttribObject = CreateFbxObject(CameraAttrib, ObjectManager); ConnectionManager.Add(new FbxConnection(AttribObject, Object, FbxRelationType.OO)); return(Object); }
public new static FbxCamera Create(FbxObject pContainer, string pName) { global::System.IntPtr cPtr = NativeMethods.FbxCamera_Create__SWIG_1(FbxObject.getCPtr(pContainer), pName); FbxCamera ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxCamera(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Visit Object and configure FbxCamera /// </summary> public static void ConfigureCamera(Camera unityCamera, FbxCamera fbxCamera) { if (unityCamera.usePhysicalProperties) { ConfigurePhysicalCamera(fbxCamera, unityCamera); } else { ConfigureGameCamera(fbxCamera, unityCamera); } }
public FbxCamera GetCamera() { global::System.IntPtr cPtr = NativeMethods.FbxNode_GetCamera(swigCPtr); FbxCamera ret = (cPtr == global::System.IntPtr.Zero) ? null : new FbxCamera(cPtr, false); if (NativeMethods.SWIGPendingException.Pending) { throw NativeMethods.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// Configure FbxCameras from a Physical Camera /// </summary> private static void ConfigurePhysicalCamera(FbxCamera fbxCamera, Camera unityCamera) { Debug.Assert(unityCamera.usePhysicalProperties); // Configure FilmBack settings float apertureHeightInInches = unityCamera.sensorSize.y.Millimeters().ToInches(); float apertureWidthInInches = unityCamera.sensorSize.x.Millimeters().ToInches(); float aspectRatio = apertureWidthInInches / apertureHeightInInches; FbxCamera.EProjectionType projectionType = unityCamera.orthographic ? FbxCamera.EProjectionType.eOrthogonal : FbxCamera.EProjectionType.ePerspective; // NOTE: it is possible to match some of the sensor sizes to the // predefined EApertureFormats : e16mmTheatrical, eSuper16mm, // e35mmFullAperture, eIMAX. However the round in the sizes is not // consistent between Unity and FBX so we choose // to leave the values as a eCustomAperture setting. fbxCamera.ProjectionType.Set(projectionType); fbxCamera.FilmAspectRatio.Set(aspectRatio); Vector2 gameViewSize = GetSizeOfMainGameView(); fbxCamera.SetAspect(FbxCamera.EAspectRatioMode.eFixedRatio, gameViewSize.x / gameViewSize.y, 1.0); fbxCamera.SetApertureWidth(apertureWidthInInches); fbxCamera.SetApertureHeight(apertureHeightInInches); // Fit the resolution gate horizontally within the film gate. fbxCamera.GateFit.Set(s_mapGateFit[unityCamera.gateFit]); // Lens Shift ( Film Offset ) as a percentage 0..1 // FBX FilmOffset is in inches fbxCamera.FilmOffsetX.Set(apertureWidthInInches * Mathf.Clamp(Mathf.Abs(unityCamera.lensShift.x), 0f, 1f) * Mathf.Sign(unityCamera.lensShift.x)); fbxCamera.FilmOffsetY.Set(apertureHeightInInches * Mathf.Clamp(Mathf.Abs(unityCamera.lensShift.y), 0f, 1f) * Mathf.Sign(unityCamera.lensShift.y)); // Focal Length fbxCamera.SetApertureMode(FbxCamera.EApertureMode.eFocalLength); double focalLength = (double)unityCamera.focalLength; fbxCamera.FocalLength.Set(focalLength); /* in millimeters */ // NearPlane fbxCamera.SetNearPlane((double)unityCamera.nearClipPlane.Meters().ToCentimeters()); // FarPlane fbxCamera.SetFarPlane((float)unityCamera.farClipPlane.Meters().ToCentimeters()); return; }
protected override void CheckScene(FbxScene scene) { base.CheckScene(scene); FbxScene origScene = CreateScene(FbxManager); FbxNode origCameraNode = origScene.GetRootNode().GetChild(0); FbxNode importCameraNode = scene.GetRootNode().GetChild(0); Assert.IsNotNull(origCameraNode); Assert.IsNotNull(importCameraNode); Assert.AreEqual(origScene.GetGlobalSettings().GetDefaultCamera(), scene.GetGlobalSettings().GetDefaultCamera()); FbxCamera origCamera = origCameraNode.GetCamera(); FbxCamera importCamera = importCameraNode.GetCamera(); Assert.IsNotNull(origCamera); Assert.IsNotNull(importCamera); CheckCameraSettings(origCamera, importCamera, origCameraNode, importCameraNode); // check anim FbxAnimStack origAnimStack = origScene.GetCurrentAnimationStack(); FbxAnimLayer origAnimLayer = origAnimStack.GetAnimLayerMember(); Assert.IsNotNull(origAnimStack); Assert.IsNotNull(origAnimLayer); FbxAnimStack importAnimStack = scene.GetCurrentAnimationStack(); FbxAnimLayer importAnimLayer = importAnimStack.GetAnimLayerMember(); Assert.IsNotNull(importAnimStack); Assert.IsNotNull(importAnimLayer); CheckAnimCurve(origCameraNode, importCameraNode, origAnimLayer, importAnimLayer, new List <PropertyComponentPair>() { new PropertyComponentPair("backgroundColor", new string[] { Globals.FBXSDK_CURVENODE_COLOR_RED, Globals.FBXSDK_CURVENODE_COLOR_GREEN, Globals.FBXSDK_CURVENODE_COLOR_BLUE, "W" }), new PropertyComponentPair("FocalLength", new string[] { null }), new PropertyComponentPair("clearFlags", new string[] { null }) }, origCamera, importCamera); }
/// <summary> /// Exports camera component /// </summary> protected FbxCamera ExportCamera(Camera unityCamera, FbxScene fbxScene, FbxNode fbxNode) { FbxCamera fbxCamera = FbxCamera.Create(fbxScene.GetFbxManager(), unityCamera.name); bool perspective = unityCamera.orthographic != true; float aspectRatio = unityCamera.aspect; // Configure FilmBack settings: 35mm TV Projection (0.816 x 0.612) float apertureHeightInInches = 0.612f; float apertureWidthInInches = aspectRatio * apertureHeightInInches; FbxCamera.EProjectionType projectionType = perspective ? FbxCamera.EProjectionType.ePerspective : FbxCamera.EProjectionType.eOrthogonal; fbxCamera.ProjectionType.Set(projectionType); fbxCamera.SetAspect(FbxCamera.EAspectRatioMode.eFixedRatio, aspectRatio, 1.0f); fbxCamera.FilmAspectRatio.Set(aspectRatio); fbxCamera.SetApertureWidth(apertureWidthInInches); fbxCamera.SetApertureHeight(apertureHeightInInches); fbxCamera.SetApertureMode(FbxCamera.EApertureMode.eFocalLength); // FOV / Focal Length fbxCamera.FocalLength.Set(fbxCamera.ComputeFocalLength(unityCamera.fieldOfView)); // NearPlane fbxCamera.SetNearPlane(unityCamera.nearClipPlane); // FarPlane fbxCamera.SetFarPlane(unityCamera.farClipPlane); // Export backgroundColor as a custom property // NOTE: export on fbxNode so that it will show up in Maya ExportColorProperty(fbxNode, unityCamera.backgroundColor, MakeName("backgroundColor"), "The color with which the screen will be cleared."); // Export clearFlags as a custom property // NOTE: export on fbxNode so that it will show up in Maya ExportIntProperty(fbxNode, (int)unityCamera.clearFlags, MakeName("clearFlags"), "How the camera clears the background."); return(fbxCamera); }
protected void CheckCameraSettings(FbxCamera origCamera, FbxCamera importCamera, FbxNode origCameraNode, FbxNode importCameraNode) { Assert.AreEqual(origCamera.ProjectionType.Get(), importCamera.ProjectionType.Get()); Assert.AreEqual(origCamera.AspectWidth.Get(), importCamera.AspectWidth.Get()); Assert.AreEqual(origCamera.AspectHeight.Get(), importCamera.AspectHeight.Get()); Assert.AreEqual(origCamera.GetAspectRatioMode(), importCamera.GetAspectRatioMode()); Assert.AreEqual(origCamera.FilmAspectRatio.Get(), importCamera.FilmAspectRatio.Get()); Assert.AreEqual(origCamera.GetApertureWidth(), importCamera.GetApertureWidth()); Assert.AreEqual(origCamera.GetApertureHeight(), importCamera.GetApertureHeight()); Assert.AreEqual(origCamera.GetApertureMode(), origCamera.GetApertureMode()); Assert.AreEqual(origCamera.FocalLength.Get(), importCamera.FocalLength.Get()); Assert.AreEqual(origCamera.GetNearPlane(), importCamera.GetNearPlane()); Assert.AreEqual(origCamera.GetFarPlane(), importCamera.GetFarPlane()); foreach (var customProp in new string[] { "backgroundColor", "clearFlags" }) { FbxProperty property = origCameraNode.FindProperty(customProp); Assert.IsNotNull(property); Assert.IsTrue(property.IsValid()); FbxProperty importBgColorProp = importCameraNode.FindProperty(customProp); Assert.IsNotNull(importBgColorProp); Assert.IsTrue(importBgColorProp.IsValid()); if (property.GetPropertyDataType().Equals(Globals.FbxColor4DT)) { Assert.AreEqual(property.GetFbxColor(), property.GetFbxColor()); } else if (property.GetPropertyDataType().Equals(Globals.FbxIntDT)) { Assert.AreEqual(property.GetInt(), property.GetInt()); } Assert.AreEqual(property.GetFlag(FbxPropertyFlags.EFlags.eUserDefined), importBgColorProp.GetFlag(FbxPropertyFlags.EFlags.eUserDefined)); Assert.AreEqual(property.GetFlag(FbxPropertyFlags.EFlags.eAnimatable), importBgColorProp.GetFlag(FbxPropertyFlags.EFlags.eAnimatable)); } }
public bool SetLeftCamera(FbxCamera pCamera) { bool ret = fbx_wrapperPINVOKE.FbxCameraStereo_SetLeftCamera(swigCPtr, FbxCamera.getCPtr(pCamera)); return(ret); }
public void TestEquality() { using (var manager = FbxManager.Create()) { // FbxProperty var node = FbxNode.Create(manager, "node"); var prop1 = FbxProperty.Create(node, Globals.FbxBoolDT, "bool1"); var prop2 = FbxProperty.Create(node, Globals.FbxBoolDT, "bool2"); var prop1copy = node.FindProperty("bool1"); EqualityTester <FbxProperty> .TestEquality(prop1, prop2, prop1copy); // FbxPropertyT<bool> var vis1 = node.VisibilityInheritance; var vis2 = FbxNode.Create(manager, "node2").VisibilityInheritance; var vis1copy = vis1; // TODO: node.FindProperty("Visibility Inheritance"); -- but that has a different proxy type EqualityTester <FbxPropertyBool> .TestEquality(vis1, vis2, vis1copy); // FbxPropertyT<EInheritType> var inhType1 = node.InheritType; var inhType2 = FbxNode.Create(manager, "node3").InheritType; var inhType1Copy = inhType1; // TODO: node.FindProperty("InheritType"); EqualityTester <FbxPropertyEInheritType> .TestEquality(inhType1, inhType2, inhType1Copy); // FbxPropertyT<double> var lambert = FbxSurfaceLambert.Create(manager, "lambert"); var emissiveCopy = lambert.EmissiveFactor; // TODO: lambert.FindProperty("EmissiveFactor"); EqualityTester <FbxPropertyDouble> .TestEquality(lambert.EmissiveFactor, lambert.AmbientFactor, emissiveCopy); // FbxPropertyT<FbxDouble3> var lclTranslationCopy = node.LclTranslation; // TODO: node.FindProperty("Lcl Translation"); EqualityTester <FbxPropertyDouble3> .TestEquality(node.LclTranslation, node.LclRotation, lclTranslationCopy); // FbxPropertyT<float> var light = FbxLight.Create(manager, "light"); EqualityTester <FbxPropertyFloat> .TestEquality(light.LeftBarnDoor, light.RightBarnDoor, light.LeftBarnDoor); // FbxPropertyT<int> var constraint = FbxConstraintAim.Create(manager, "constraint"); var constraint2 = FbxConstraintAim.Create(manager, "constraint2"); var worldUpTypeCopy = constraint.WorldUpType; // TODO: constraint.FindProperty("WorldUpType"); EqualityTester <FbxPropertyInt> .TestEquality(constraint.WorldUpType, constraint2.WorldUpType, worldUpTypeCopy); // FbxPropertyT<> for FbxTexture enums var tex1 = FbxTexture.Create(manager, "tex1"); var tex2 = FbxTexture.Create(manager, "tex2"); var blendCopy = tex1.CurrentTextureBlendMode; // TODO: tex1.FindProperty(...) EqualityTester <FbxPropertyEBlendMode> .TestEquality(tex1.CurrentTextureBlendMode, tex2.CurrentTextureBlendMode, blendCopy); var wrapCopy = tex1.WrapModeU; // TODO: tex1.FindProperty(...) EqualityTester <FbxPropertyEWrapMode> .TestEquality(tex1.WrapModeU, tex2.WrapModeU, wrapCopy); // FbxPropertyT<FbxNull.ELook> var null1 = FbxNull.Create(manager, "null1"); var null2 = FbxNull.Create(manager, "null2"); EqualityTester <FbxPropertyNullELook> .TestEquality(null1.Look, null2.Look, null1.Look); // FbxPropertyT<FbxMarker.ELook> var marker1 = FbxMarker.Create(manager, "marker1"); var marker2 = FbxMarker.Create(manager, "marker2"); EqualityTester <FbxPropertyMarkerELook> .TestEquality(marker1.Look, marker2.Look, marker1.Look); // FbxPropertyT<string> var impl = FbxImplementation.Create(manager, "impl"); var renderAPIcopy = impl.RenderAPI; // TODO: impl.FindProperty("RenderAPI"); EqualityTester <FbxPropertyString> .TestEquality(impl.RenderAPI, impl.RenderAPIVersion, renderAPIcopy); // FbxPropertyT<> for FbxCamera enum EProjectionType var cam1 = FbxCamera.Create(manager, "cam1"); var cam2 = FbxCamera.Create(manager, "cam2"); var projectionCopy = cam1.ProjectionType; EqualityTester <FbxPropertyEProjectionType> .TestEquality(cam1.ProjectionType, cam2.ProjectionType, projectionCopy); // FbxPropertyT<> for FbxLight enum EType var light1 = FbxLight.Create(manager, "light1"); var light2 = FbxLight.Create(manager, "light2"); var typeCopy = light1.LightType; EqualityTester <FbxPropertyELightType> .TestEquality(light1.LightType, light2.LightType, typeCopy); var lightShapeCopy = light1.AreaLightShape; EqualityTester <FbxPropertyEAreaLightShape> .TestEquality(light1.AreaLightShape, light2.AreaLightShape, lightShapeCopy); var decayCopy = light1.DecayType; EqualityTester <FbxPropertyEDecayType> .TestEquality(light1.DecayType, light2.DecayType, decayCopy); var floatCopy = light1.LeftBarnDoor; EqualityTester <FbxPropertyFloat> .TestEquality(light1.LeftBarnDoor, light2.LeftBarnDoor, floatCopy); } }
public void BasicTests() { using (var manager = FbxManager.Create()) { // FbxPropertyT<FbxBool> example: VisibilityInheritance on a node var node = FbxNode.Create(manager, "node"); GenericPropertyTests <FbxPropertyBool> (node.VisibilityInheritance, node, "Visibility Inheritance", Globals.FbxVisibilityInheritanceDT); var property = node.VisibilityInheritance; property.Set(false); Assert.AreEqual(false, property.Get()); Assert.AreEqual(false, property.EvaluateValue()); Assert.AreEqual(false, property.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(false, property.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<FbxDouble> example: several of them on a Lambert shader var obj = FbxSurfaceLambert.Create(manager, "lambert"); GenericPropertyTests <FbxPropertyDouble> (obj.EmissiveFactor, obj, "EmissiveFactor", Globals.FbxDoubleDT); var property = obj.EmissiveFactor; property.Set(5.0); // bool Set<float> is not accessible here! Assert.AreEqual(5.0, property.Get()); Assert.AreEqual(5.0, property.EvaluateValue()); Assert.AreEqual(5.0, property.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(5.0, property.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<Double3> example: the LclTranslation on a node var node = FbxNode.Create(manager, "node"); GenericPropertyTests <FbxPropertyDouble3> (node.LclTranslation, node, "Lcl Translation", Globals.FbxLocalTranslationDT); var property = node.LclTranslation; property.Set(new FbxDouble3(1, 2, 3)); Assert.AreEqual(new FbxDouble3(1, 2, 3), property.Get()); Assert.AreEqual(new FbxDouble3(1, 2, 3), property.EvaluateValue()); Assert.AreEqual(new FbxDouble3(1, 2, 3), property.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(new FbxDouble3(1, 2, 3), property.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<float> example: the LeftBarnDoor on a light var light = FbxLight.Create(manager, "light"); GenericPropertyTests(light.LeftBarnDoor, light, "LeftBarnDoor", Globals.FbxFloatDT); var property = light.LeftBarnDoor; light.LeftBarnDoor.Set(5.0f); Assert.AreEqual(5.0f, light.LeftBarnDoor.Get()); Assert.AreEqual(5.0f, property.EvaluateValue()); Assert.AreEqual(5.0f, property.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(5.0f, property.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<int> example: the WorldUpType on an aim constraint var constraint = FbxConstraintAim.Create(manager, "constraint"); GenericPropertyTests(constraint.WorldUpType, constraint, "WorldUpType", Globals.FbxEnumDT); var property = constraint.WorldUpType; int value = (int)FbxConstraintAim.EWorldUp.eAimAtObjectUp; constraint.WorldUpType.Set(value); Assert.That(constraint.WorldUpType.Get(), Is.EqualTo(value)); Assert.That(property.EvaluateValue(), Is.EqualTo(value)); Assert.That(property.EvaluateValue(FbxTime.FromSecondDouble(5)), Is.EqualTo(value)); Assert.That(property.EvaluateValue(FbxTime.FromSecondDouble(5), true), Is.EqualTo(value)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<FbxString> example: the description of a shader implementation var impl = FbxImplementation.Create(manager, "name"); GenericPropertyTests <FbxPropertyString> (impl.RenderAPI, impl, "RenderAPI", Globals.FbxStringDT); var property = impl.RenderAPI; property.Set("a value"); Assert.AreEqual("a value", property.Get()); // animated strings come out as empty-string Assert.AreEqual("", property.EvaluateValue()); Assert.AreEqual("", property.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual("", property.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT for FbxTexture enums EBlendMode and EWrapMode var tex = FbxTexture.Create(manager, "tex"); FbxPropertyTest.GenericPropertyTests(tex.CurrentTextureBlendMode, tex, "CurrentTextureBlendMode", Globals.FbxEnumDT); tex.CurrentTextureBlendMode.Set(FbxTexture.EBlendMode.eAdditive); Assert.AreEqual(FbxTexture.EBlendMode.eAdditive, tex.CurrentTextureBlendMode.Get()); Assert.AreEqual(FbxTexture.EBlendMode.eAdditive, tex.CurrentTextureBlendMode.EvaluateValue()); Assert.AreEqual(FbxTexture.EBlendMode.eAdditive, tex.CurrentTextureBlendMode.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxTexture.EBlendMode.eAdditive, tex.CurrentTextureBlendMode.EvaluateValue(FbxTime.FromSecondDouble(5), true)); FbxPropertyTest.GenericPropertyTests(tex.WrapModeU, tex, "WrapModeU", Globals.FbxEnumDT); tex.WrapModeU.Set(FbxTexture.EWrapMode.eClamp); Assert.AreEqual(FbxTexture.EWrapMode.eClamp, tex.WrapModeU.Get()); Assert.AreEqual(FbxTexture.EWrapMode.eClamp, tex.WrapModeU.EvaluateValue()); Assert.AreEqual(FbxTexture.EWrapMode.eClamp, tex.WrapModeU.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxTexture.EWrapMode.eClamp, tex.WrapModeU.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<FbxNull.ELook> var null1 = FbxNull.Create(manager, "null1"); FbxPropertyTest.GenericPropertyTests(null1.Look, null1, "Look", Globals.FbxEnumDT); null1.Look.Set(FbxNull.ELook.eCross); Assert.AreEqual(FbxNull.ELook.eCross, null1.Look.Get()); Assert.AreEqual(FbxNull.ELook.eCross, null1.Look.EvaluateValue()); Assert.AreEqual(FbxNull.ELook.eCross, null1.Look.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxNull.ELook.eCross, null1.Look.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<FbxMarker.ELook> var marker1 = FbxMarker.Create(manager, "marker1"); FbxPropertyTest.GenericPropertyTests(marker1.Look, marker1, "Look", Globals.FbxEnumDT); marker1.Look.Set(FbxMarker.ELook.eCapsule); Assert.AreEqual(FbxMarker.ELook.eCapsule, marker1.Look.Get()); Assert.AreEqual(FbxMarker.ELook.eCapsule, marker1.Look.EvaluateValue()); Assert.AreEqual(FbxMarker.ELook.eCapsule, marker1.Look.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxMarker.ELook.eCapsule, marker1.Look.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT for FbxCamera enum EProjectionType var camera = FbxCamera.Create(manager, "camera"); FbxPropertyTest.GenericPropertyTests(camera.ProjectionType, camera, "CameraProjectionType", Globals.FbxEnumDT); camera.ProjectionType.Set(FbxCamera.EProjectionType.ePerspective); Assert.AreEqual(FbxCamera.EProjectionType.ePerspective, camera.ProjectionType.Get()); Assert.AreEqual(FbxCamera.EProjectionType.ePerspective, camera.ProjectionType.EvaluateValue()); Assert.AreEqual(FbxCamera.EProjectionType.ePerspective, camera.ProjectionType.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxCamera.EProjectionType.ePerspective, camera.ProjectionType.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT for FbxCamera enum EGateFit var camera = FbxCamera.Create(manager, "camera"); FbxPropertyTest.GenericPropertyTests(camera.GateFit, camera, "GateFit", Globals.FbxEnumDT); camera.GateFit.Set(FbxCamera.EGateFit.eFitHorizontal); Assert.AreEqual(FbxCamera.EGateFit.eFitHorizontal, camera.GateFit.Get()); Assert.AreEqual(FbxCamera.EGateFit.eFitHorizontal, camera.GateFit.EvaluateValue()); Assert.AreEqual(FbxCamera.EGateFit.eFitHorizontal, camera.GateFit.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxCamera.EGateFit.eFitHorizontal, camera.GateFit.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT<EInheritType> var node = FbxNode.Create(manager, "node"); FbxPropertyTest.GenericPropertyTests(node.InheritType, node, "InheritType", Globals.FbxEnumDT); node.InheritType.Set(FbxTransform.EInheritType.eInheritRSrs); Assert.AreEqual(FbxTransform.EInheritType.eInheritRSrs, node.InheritType.Get()); Assert.AreEqual(FbxTransform.EInheritType.eInheritRSrs, node.InheritType.EvaluateValue()); Assert.AreEqual(FbxTransform.EInheritType.eInheritRSrs, node.InheritType.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxTransform.EInheritType.eInheritRSrs, node.InheritType.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // FbxPropertyT for FbxLight enums var light = FbxLight.Create(manager, "light"); FbxPropertyTest.GenericPropertyTests(light.LightType, light, "LightType", Globals.FbxEnumDT); light.LightType.Set(FbxLight.EType.eSpot); Assert.AreEqual(FbxLight.EType.eSpot, light.LightType.Get()); Assert.AreEqual(FbxLight.EType.eSpot, light.LightType.EvaluateValue()); Assert.AreEqual(FbxLight.EType.eSpot, light.LightType.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxLight.EType.eSpot, light.LightType.EvaluateValue(FbxTime.FromSecondDouble(5), true)); FbxPropertyTest.GenericPropertyTests(light.AreaLightShape, light, "AreaLightShape", Globals.FbxEnumDT); light.AreaLightShape.Set(FbxLight.EAreaLightShape.eSphere); Assert.AreEqual(FbxLight.EAreaLightShape.eSphere, light.AreaLightShape.Get()); Assert.AreEqual(FbxLight.EAreaLightShape.eSphere, light.AreaLightShape.EvaluateValue()); Assert.AreEqual(FbxLight.EAreaLightShape.eSphere, light.AreaLightShape.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxLight.EAreaLightShape.eSphere, light.AreaLightShape.EvaluateValue(FbxTime.FromSecondDouble(5), true)); FbxPropertyTest.GenericPropertyTests(light.DecayType, light, "DecayType", Globals.FbxEnumDT); light.DecayType.Set(FbxLight.EDecayType.eCubic); Assert.AreEqual(FbxLight.EDecayType.eCubic, light.DecayType.Get()); Assert.AreEqual(FbxLight.EDecayType.eCubic, light.DecayType.EvaluateValue()); Assert.AreEqual(FbxLight.EDecayType.eCubic, light.DecayType.EvaluateValue(FbxTime.FromSecondDouble(5))); Assert.AreEqual(FbxLight.EDecayType.eCubic, light.DecayType.EvaluateValue(FbxTime.FromSecondDouble(5), true)); } using (var manager = FbxManager.Create()) { // Test all the create and destroy operations FbxProperty root, child; var obj = FbxObject.Create(manager, "obj"); Assert.IsNotNull(FbxProperty.Create(obj, Globals.FbxStringDT, "a")); Assert.IsNotNull(FbxProperty.Create(obj, Globals.FbxStringDT, "b", "label")); Assert.IsNotNull(FbxProperty.Create(obj, Globals.FbxStringDT, "c", "label", false)); bool didFind; Assert.IsNotNull(FbxProperty.Create(obj, Globals.FbxStringDT, "c", "label", true, out didFind)); Assert.IsTrue(didFind); root = FbxProperty.Create(obj, Globals.FbxCompoundDT, "root"); child = FbxProperty.Create(root, Globals.FbxStringDT, "a"); Assert.IsNotNull(child); Assert.IsNotNull(FbxProperty.Create(root, Globals.FbxStringDT, "b", "label")); Assert.IsNotNull(FbxProperty.Create(root, Globals.FbxStringDT, "c", "label", false)); Assert.IsNotNull(FbxProperty.Create(root, Globals.FbxStringDT, "c", "label", true, out didFind)); Assert.IsTrue(didFind); child.Destroy(); root.DestroyChildren(); Assert.IsNotNull(FbxProperty.Create(root, Globals.FbxStringDT, "c", "label", true, out didFind)); Assert.IsFalse(didFind); root.DestroyRecursively(); } }
public static void Export(System.Action <string> WriteLine, Mesh mesh, Matrix4x4 transform, List <string> Comments = null) { // temp objects var MeshAnim = new AnimObject(); MeshAnim.AddFrame(new Vector3(0, 0, 0), Quaternion.identity, 0); MeshAnim.AddFrame(new Vector3(0, 1000, 0), Quaternion.Euler(0, 90, 0), 1); MeshAnim.AddFrame(new Vector3(0, 0, 0), Quaternion.Euler(0, 180, 0), 2); MeshAnim.AddFrame(new Vector3(0, 1000, 0), Quaternion.Euler(0, 270, 0), 3); MeshAnim.AddFrame(new Vector3(0, 0, 0), Quaternion.Euler(0, 359, 0), 4); var AnimStack = new AnimStack("Take001", MeshAnim.GetStartTime(), MeshAnim.GetEndTime()); var Cam = new FbxCamera("Camera1"); Pop.AllocIfNull(ref Comments); Comments.Add("Using WIP PopX.FbxAscii exporter from @soylentgraham"); var Header = GetHeaderProperty(); Header.AddComment(Comments); Export(WriteLine, Header); var ConnectionManager = new FbxConnectionManager(); var ObjectManager = new FbxObjectManager(); //var MeshObject = CreateFbxObject(mesh, transform, ObjectManager); var CameraObject = CreateFbxObject(Cam, transform, ObjectManager, ConnectionManager); var AnimLayerObject = CreateAnimLayerObject(ObjectManager); var AnimStackObject = CreateAnimStackObject(AnimStack, ObjectManager); MakeAnimationNode(MeshAnim, CameraObject, AnimLayerObject, ObjectManager, ConnectionManager); ConnectionManager.Add(new FbxConnection(AnimLayerObject.TypeName, AnimLayerObject.ObjectName, AnimLayerObject, AnimStackObject.TypeName, AnimStackObject.ObjectName, AnimStackObject, FbxRelationType.OO)); var Definitions = GetDefinitionsProperty(ObjectManager); Export(WriteLine, Definitions); Export(WriteLine, ObjectManager); // fake connections after we've exported ObjectManager var SceneMesh = new Mesh(); SceneMesh.name = "Root"; var SceneMeshObject = CreateFbxObject(SceneMesh, Matrix4x4.identity, ObjectManager, FbxObjectManager.RootNodeIdent); //var MeshMaterialObject = CreateFbxObject_Material("DummyMaterial", ObjectManager); //ConnectionManager.Add(new FbxConnection( MeshObject, SceneMeshObject, FbxRelationType.OO)); ConnectionManager.Add(new FbxConnection(CameraObject, SceneMeshObject, FbxRelationType.OO)); //ConnectionManager.Add(new FbxConnection( MeshMaterialObject.TypeName, MeshMaterialObject.ObjectName, MeshMaterialObject, MeshObject.TypeName, MeshObject.ObjectName, MeshObject, FbxRelationType.OO)); Export(WriteLine, ConnectionManager); }
public bool SetRightCamera(FbxCamera pCamera) { bool ret = FbxWrapperNativePINVOKE.FbxCameraStereo_SetRightCamera(swigCPtr, FbxCamera.getCPtr(pCamera)); return(ret); }
public bool IsProducerCamera(FbxCamera pCamera) { bool ret = fbx_wrapperPINVOKE.FbxGlobalCameraSettings_IsProducerCamera(swigCPtr, FbxCamera.getCPtr(pCamera)); return(ret); }
public bool CopyProducerCamera(string pCameraName, FbxCamera pCamera) { bool ret = fbx_wrapperPINVOKE.FbxGlobalCameraSettings_CopyProducerCamera(swigCPtr, pCameraName, FbxCamera.getCPtr(pCamera)); return(ret); }
public void Camera_Create_HasProperties() { // given: var camera = new FbxCamera("camera"); FbxProperty prop; // then: Assert.AreEqual(106, CountProperties(camera)); Assert.AreEqual(0, camera.GetSrcPropertyCount()); Assert.AreEqual(0, camera.GetDstPropertyCount()); prop = camera.FindProperty("Color"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.Color); Assert.True(camera.Color.IsValid()); Assert.AreEqual("Color", camera.Color.GetName()); Assert.AreSame(prop, camera.Color); prop = camera.FindProperty("Position"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.Position); Assert.True(camera.Position.IsValid()); Assert.AreEqual("Position", camera.Position.GetName()); Assert.AreSame(prop, camera.Position); prop = camera.FindProperty("UpVector"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UpVector); Assert.True(camera.UpVector.IsValid()); Assert.AreEqual("UpVector", camera.UpVector.GetName()); Assert.AreSame(prop, camera.UpVector); prop = camera.FindProperty("InterestPosition"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.InterestPosition); Assert.True(camera.InterestPosition.IsValid()); Assert.AreEqual("InterestPosition", camera.InterestPosition.GetName()); Assert.AreSame(prop, camera.InterestPosition); prop = camera.FindProperty("Roll"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.Roll); Assert.True(camera.Roll.IsValid()); Assert.AreEqual("Roll", camera.Roll.GetName()); Assert.AreSame(prop, camera.Roll); prop = camera.FindProperty("OpticalCenterX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.OpticalCenterX); Assert.True(camera.OpticalCenterX.IsValid()); Assert.AreEqual("OpticalCenterX", camera.OpticalCenterX.GetName()); Assert.AreSame(prop, camera.OpticalCenterX); prop = camera.FindProperty("OpticalCenterY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.OpticalCenterY); Assert.True(camera.OpticalCenterY.IsValid()); Assert.AreEqual("OpticalCenterY", camera.OpticalCenterY.GetName()); Assert.AreSame(prop, camera.OpticalCenterY); prop = camera.FindProperty("BackgroundColor"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackgroundColor); Assert.True(camera.BackgroundColor.IsValid()); Assert.AreEqual("BackgroundColor", camera.BackgroundColor.GetName()); Assert.AreSame(prop, camera.BackgroundColor); prop = camera.FindProperty("TurnTable"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.TurnTable); Assert.True(camera.TurnTable.IsValid()); Assert.AreEqual("TurnTable", camera.TurnTable.GetName()); Assert.AreSame(prop, camera.TurnTable); prop = camera.FindProperty("DisplayTurnTableIcon"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.DisplayTurnTableIcon); Assert.True(camera.DisplayTurnTableIcon.IsValid()); Assert.AreEqual("DisplayTurnTableIcon", camera.DisplayTurnTableIcon.GetName()); Assert.AreSame(prop, camera.DisplayTurnTableIcon); prop = camera.FindProperty("UseMotionBlur"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseMotionBlur); Assert.True(camera.UseMotionBlur.IsValid()); Assert.AreEqual("UseMotionBlur", camera.UseMotionBlur.GetName()); Assert.AreSame(prop, camera.UseMotionBlur); prop = camera.FindProperty("UseRealTimeMotionBlur"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseRealTimeMotionBlur); Assert.True(camera.UseRealTimeMotionBlur.IsValid()); Assert.AreEqual("UseRealTimeMotionBlur", camera.UseRealTimeMotionBlur.GetName()); Assert.AreSame(prop, camera.UseRealTimeMotionBlur); prop = camera.FindProperty("Motion Blur Intensity"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.MotionBlurIntensity); Assert.True(camera.MotionBlurIntensity.IsValid()); Assert.AreEqual("Motion Blur Intensity", camera.MotionBlurIntensity.GetName()); Assert.AreSame(prop, camera.MotionBlurIntensity); prop = camera.FindProperty("AspectRatioMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AspectRatioMode); Assert.True(camera.AspectRatioMode.IsValid()); Assert.AreEqual("AspectRatioMode", camera.AspectRatioMode.GetName()); Assert.AreSame(prop, camera.AspectRatioMode); prop = camera.FindProperty("AspectWidth"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AspectWidth); Assert.True(camera.AspectWidth.IsValid()); Assert.AreEqual("AspectWidth", camera.AspectWidth.GetName()); Assert.AreSame(prop, camera.AspectWidth); prop = camera.FindProperty("AspectHeight"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AspectHeight); Assert.True(camera.AspectHeight.IsValid()); Assert.AreEqual("AspectHeight", camera.AspectHeight.GetName()); Assert.AreSame(prop, camera.AspectHeight); prop = camera.FindProperty("PixelAspectRatio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.PixelAspectRatio); Assert.True(camera.PixelAspectRatio.IsValid()); Assert.AreEqual("PixelAspectRatio", camera.PixelAspectRatio.GetName()); Assert.AreSame(prop, camera.PixelAspectRatio); prop = camera.FindProperty("ApertureMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ApertureMode); Assert.True(camera.ApertureMode.IsValid()); Assert.AreEqual("ApertureMode", camera.ApertureMode.GetName()); Assert.AreSame(prop, camera.ApertureMode); prop = camera.FindProperty("GateFit"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.GateFit); Assert.True(camera.GateFit.IsValid()); Assert.AreEqual("GateFit", camera.GateFit.GetName()); Assert.AreSame(prop, camera.GateFit); prop = camera.FindProperty("FieldOfView"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FieldOfView); Assert.True(camera.FieldOfView.IsValid()); Assert.AreEqual("FieldOfView", camera.FieldOfView.GetName()); Assert.AreSame(prop, camera.FieldOfView); prop = camera.FindProperty("FieldOfViewX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FieldOfViewX); Assert.True(camera.FieldOfViewX.IsValid()); Assert.AreEqual("FieldOfViewX", camera.FieldOfViewX.GetName()); Assert.AreSame(prop, camera.FieldOfViewX); prop = camera.FindProperty("FieldOfViewY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FieldOfViewY); Assert.True(camera.FieldOfViewY.IsValid()); Assert.AreEqual("FieldOfViewY", camera.FieldOfViewY.GetName()); Assert.AreSame(prop, camera.FieldOfViewY); prop = camera.FindProperty("FocalLength"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FocalLength); Assert.True(camera.FocalLength.IsValid()); Assert.AreEqual("FocalLength", camera.FocalLength.GetName()); Assert.AreSame(prop, camera.FocalLength); prop = camera.FindProperty("CameraFormat"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.CameraFormat); Assert.True(camera.CameraFormat.IsValid()); Assert.AreEqual("CameraFormat", camera.CameraFormat.GetName()); Assert.AreSame(prop, camera.CameraFormat); prop = camera.FindProperty("UseFrameColor"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseFrameColor); Assert.True(camera.UseFrameColor.IsValid()); Assert.AreEqual("UseFrameColor", camera.UseFrameColor.GetName()); Assert.AreSame(prop, camera.UseFrameColor); prop = camera.FindProperty("FrameColor"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrameColor); Assert.True(camera.FrameColor.IsValid()); Assert.AreEqual("FrameColor", camera.FrameColor.GetName()); Assert.AreSame(prop, camera.FrameColor); prop = camera.FindProperty("ShowName"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowName); Assert.True(camera.ShowName.IsValid()); Assert.AreEqual("ShowName", camera.ShowName.GetName()); Assert.AreSame(prop, camera.ShowName); prop = camera.FindProperty("ShowInfoOnMoving"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowInfoOnMoving); Assert.True(camera.ShowInfoOnMoving.IsValid()); Assert.AreEqual("ShowInfoOnMoving", camera.ShowInfoOnMoving.GetName()); Assert.AreSame(prop, camera.ShowInfoOnMoving); prop = camera.FindProperty("ShowGrid"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowGrid); Assert.True(camera.ShowGrid.IsValid()); Assert.AreEqual("ShowGrid", camera.ShowGrid.GetName()); Assert.AreSame(prop, camera.ShowGrid); prop = camera.FindProperty("ShowOpticalCenter"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowOpticalCenter); Assert.True(camera.ShowOpticalCenter.IsValid()); Assert.AreEqual("ShowOpticalCenter", camera.ShowOpticalCenter.GetName()); Assert.AreSame(prop, camera.ShowOpticalCenter); prop = camera.FindProperty("ShowAzimut"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowAzimut); Assert.True(camera.ShowAzimut.IsValid()); Assert.AreEqual("ShowAzimut", camera.ShowAzimut.GetName()); Assert.AreSame(prop, camera.ShowAzimut); prop = camera.FindProperty("ShowTimeCode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowTimeCode); Assert.True(camera.ShowTimeCode.IsValid()); Assert.AreEqual("ShowTimeCode", camera.ShowTimeCode.GetName()); Assert.AreSame(prop, camera.ShowTimeCode); prop = camera.FindProperty("ShowAudio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowAudio); Assert.True(camera.ShowAudio.IsValid()); Assert.AreEqual("ShowAudio", camera.ShowAudio.GetName()); Assert.AreSame(prop, camera.ShowAudio); prop = camera.FindProperty("AudioColor"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AudioColor); Assert.True(camera.AudioColor.IsValid()); Assert.AreEqual("AudioColor", camera.AudioColor.GetName()); Assert.AreSame(prop, camera.AudioColor); prop = camera.FindProperty("NearPlane"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.NearPlane); Assert.True(camera.NearPlane.IsValid()); Assert.AreEqual("NearPlane", camera.NearPlane.GetName()); Assert.AreSame(prop, camera.NearPlane); prop = camera.FindProperty("FarPlane"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FarPlane); Assert.True(camera.FarPlane.IsValid()); Assert.AreEqual("FarPlane", camera.FarPlane.GetName()); Assert.AreSame(prop, camera.FarPlane); prop = camera.FindProperty("AutoComputeClipPanes"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AutoComputeClipPlanes); Assert.True(camera.AutoComputeClipPlanes.IsValid()); Assert.AreEqual("AutoComputeClipPanes", camera.AutoComputeClipPlanes.GetName()); Assert.AreSame(prop, camera.AutoComputeClipPlanes); prop = camera.FindProperty("FilmWidth"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmWidth); Assert.True(camera.FilmWidth.IsValid()); Assert.AreEqual("FilmWidth", camera.FilmWidth.GetName()); Assert.AreSame(prop, camera.FilmWidth); prop = camera.FindProperty("FilmHeight"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmHeight); Assert.True(camera.FilmHeight.IsValid()); Assert.AreEqual("FilmHeight", camera.FilmHeight.GetName()); Assert.AreSame(prop, camera.FilmHeight); prop = camera.FindProperty("FilmAspectRatio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmAspectRatio); Assert.True(camera.FilmAspectRatio.IsValid()); Assert.AreEqual("FilmAspectRatio", camera.FilmAspectRatio.GetName()); Assert.AreSame(prop, camera.FilmAspectRatio); prop = camera.FindProperty("FilmSqueezeRatio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmSqueezeRatio); Assert.True(camera.FilmSqueezeRatio.IsValid()); Assert.AreEqual("FilmSqueezeRatio", camera.FilmSqueezeRatio.GetName()); Assert.AreSame(prop, camera.FilmSqueezeRatio); prop = camera.FindProperty("FilmFormatIndex"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmFormat); Assert.True(camera.FilmFormat.IsValid()); Assert.AreEqual("FilmFormatIndex", camera.FilmFormat.GetName()); Assert.AreSame(prop, camera.FilmFormat); prop = camera.FindProperty("FilmOffsetX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmOffsetX); Assert.True(camera.FilmOffsetX.IsValid()); Assert.AreEqual("FilmOffsetX", camera.FilmOffsetX.GetName()); Assert.AreSame(prop, camera.FilmOffsetX); prop = camera.FindProperty("FilmOffsetY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmOffsetY); Assert.True(camera.FilmOffsetY.IsValid()); Assert.AreEqual("FilmOffsetY", camera.FilmOffsetY.GetName()); Assert.AreSame(prop, camera.FilmOffsetY); prop = camera.FindProperty("PreScale"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.PreScale); Assert.True(camera.PreScale.IsValid()); Assert.AreEqual("PreScale", camera.PreScale.GetName()); Assert.AreSame(prop, camera.PreScale); prop = camera.FindProperty("FilmTranslateX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmTranslateX); Assert.True(camera.FilmTranslateX.IsValid()); Assert.AreEqual("FilmTranslateX", camera.FilmTranslateX.GetName()); Assert.AreSame(prop, camera.FilmTranslateX); prop = camera.FindProperty("FilmTranslateY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmTranslateY); Assert.True(camera.FilmTranslateY.IsValid()); Assert.AreEqual("FilmTranslateY", camera.FilmTranslateY.GetName()); Assert.AreSame(prop, camera.FilmTranslateY); prop = camera.FindProperty("FilmRollPivotX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmRollPivotX); Assert.True(camera.FilmRollPivotX.IsValid()); Assert.AreEqual("FilmRollPivotX", camera.FilmRollPivotX.GetName()); Assert.AreSame(prop, camera.FilmRollPivotX); prop = camera.FindProperty("FilmRollPivotY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmRollPivotY); Assert.True(camera.FilmRollPivotY.IsValid()); Assert.AreEqual("FilmRollPivotY", camera.FilmRollPivotY.GetName()); Assert.AreSame(prop, camera.FilmRollPivotY); prop = camera.FindProperty("FilmRollValue"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmRollValue); Assert.True(camera.FilmRollValue.IsValid()); Assert.AreEqual("FilmRollValue", camera.FilmRollValue.GetName()); Assert.AreSame(prop, camera.FilmRollValue); prop = camera.FindProperty("FilmRollOrder"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FilmRollOrder); Assert.True(camera.FilmRollOrder.IsValid()); Assert.AreEqual("FilmRollOrder", camera.FilmRollOrder.GetName()); Assert.AreSame(prop, camera.FilmRollOrder); prop = camera.FindProperty("ViewCameraToLookAt"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ViewCameraToLookAt); Assert.True(camera.ViewCameraToLookAt.IsValid()); Assert.AreEqual("ViewCameraToLookAt", camera.ViewCameraToLookAt.GetName()); Assert.AreSame(prop, camera.ViewCameraToLookAt); prop = camera.FindProperty("ViewFrustumNearFarPlane"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ViewFrustumNearFarPlane); Assert.True(camera.ViewFrustumNearFarPlane.IsValid()); Assert.AreEqual("ViewFrustumNearFarPlane", camera.ViewFrustumNearFarPlane.GetName()); Assert.AreSame(prop, camera.ViewFrustumNearFarPlane); prop = camera.FindProperty("ViewFrustumBackPlaneMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ViewFrustumBackPlaneMode); Assert.True(camera.ViewFrustumBackPlaneMode.IsValid()); Assert.AreEqual("ViewFrustumBackPlaneMode", camera.ViewFrustumBackPlaneMode.GetName()); Assert.AreSame(prop, camera.ViewFrustumBackPlaneMode); prop = camera.FindProperty("BackPlaneDistance"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneDistance); Assert.True(camera.BackPlaneDistance.IsValid()); Assert.AreEqual("BackPlaneDistance", camera.BackPlaneDistance.GetName()); Assert.AreSame(prop, camera.BackPlaneDistance); prop = camera.FindProperty("BackPlaneDistanceMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneDistanceMode); Assert.True(camera.BackPlaneDistanceMode.IsValid()); Assert.AreEqual("BackPlaneDistanceMode", camera.BackPlaneDistanceMode.GetName()); Assert.AreSame(prop, camera.BackPlaneDistanceMode); prop = camera.FindProperty("ViewFrustumFrontPlaneMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ViewFrustumFrontPlaneMode); Assert.True(camera.ViewFrustumFrontPlaneMode.IsValid()); Assert.AreEqual("ViewFrustumFrontPlaneMode", camera.ViewFrustumFrontPlaneMode.GetName()); Assert.AreSame(prop, camera.ViewFrustumFrontPlaneMode); prop = camera.FindProperty("FrontPlaneDistance"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneDistance); Assert.True(camera.FrontPlaneDistance.IsValid()); Assert.AreEqual("FrontPlaneDistance", camera.FrontPlaneDistance.GetName()); Assert.AreSame(prop, camera.FrontPlaneDistance); prop = camera.FindProperty("FrontPlaneDistanceMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneDistanceMode); Assert.True(camera.FrontPlaneDistanceMode.IsValid()); Assert.AreEqual("FrontPlaneDistanceMode", camera.FrontPlaneDistanceMode.GetName()); Assert.AreSame(prop, camera.FrontPlaneDistanceMode); prop = camera.FindProperty("LockMode"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.LockMode); Assert.True(camera.LockMode.IsValid()); Assert.AreEqual("LockMode", camera.LockMode.GetName()); Assert.AreSame(prop, camera.LockMode); prop = camera.FindProperty("LockInterestNavigation"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.LockInterestNavigation); Assert.True(camera.LockInterestNavigation.IsValid()); Assert.AreEqual("LockInterestNavigation", camera.LockInterestNavigation.GetName()); Assert.AreSame(prop, camera.LockInterestNavigation); prop = camera.FindProperty("BackPlateFitImage"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlateFitImage); Assert.True(camera.BackPlateFitImage.IsValid()); Assert.AreEqual("BackPlateFitImage", camera.BackPlateFitImage.GetName()); Assert.AreSame(prop, camera.BackPlateFitImage); prop = camera.FindProperty("BackPlateCrop"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlateCrop); Assert.True(camera.BackPlateCrop.IsValid()); Assert.AreEqual("BackPlateCrop", camera.BackPlateCrop.GetName()); Assert.AreSame(prop, camera.BackPlateCrop); prop = camera.FindProperty("BackPlateCenter"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlateCenter); Assert.True(camera.BackPlateCenter.IsValid()); Assert.AreEqual("BackPlateCenter", camera.BackPlateCenter.GetName()); Assert.AreSame(prop, camera.BackPlateCenter); prop = camera.FindProperty("BackPlateKeepRatio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlateKeepRatio); Assert.True(camera.BackPlateKeepRatio.IsValid()); Assert.AreEqual("BackPlateKeepRatio", camera.BackPlateKeepRatio.GetName()); Assert.AreSame(prop, camera.BackPlateKeepRatio); prop = camera.FindProperty("BackgroundAlphaTreshold"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackgroundAlphaTreshold); Assert.True(camera.BackgroundAlphaTreshold.IsValid()); Assert.AreEqual("BackgroundAlphaTreshold", camera.BackgroundAlphaTreshold.GetName()); Assert.AreSame(prop, camera.BackgroundAlphaTreshold); prop = camera.FindProperty("BackPlaneOffsetX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneOffsetX); Assert.True(camera.BackPlaneOffsetX.IsValid()); Assert.AreEqual("BackPlaneOffsetX", camera.BackPlaneOffsetX.GetName()); Assert.AreSame(prop, camera.BackPlaneOffsetX); prop = camera.FindProperty("BackPlaneOffsetY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneOffsetY); Assert.True(camera.BackPlaneOffsetY.IsValid()); Assert.AreEqual("BackPlaneOffsetY", camera.BackPlaneOffsetY.GetName()); Assert.AreSame(prop, camera.BackPlaneOffsetY); prop = camera.FindProperty("BackPlaneRotation"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneRotation); Assert.True(camera.BackPlaneRotation.IsValid()); Assert.AreEqual("BackPlaneRotation", camera.BackPlaneRotation.GetName()); Assert.AreSame(prop, camera.BackPlaneRotation); prop = camera.FindProperty("BackPlaneScaleX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneScaleX); Assert.True(camera.BackPlaneScaleX.IsValid()); Assert.AreEqual("BackPlaneScaleX", camera.BackPlaneScaleX.GetName()); Assert.AreSame(prop, camera.BackPlaneScaleX); prop = camera.FindProperty("BackPlaneScaleY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackPlaneScaleY); Assert.True(camera.BackPlaneScaleY.IsValid()); Assert.AreEqual("BackPlaneScaleY", camera.BackPlaneScaleY.GetName()); Assert.AreSame(prop, camera.BackPlaneScaleY); prop = camera.FindProperty("ShowBackplate"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowBackplate); Assert.True(camera.ShowBackplate.IsValid()); Assert.AreEqual("ShowBackplate", camera.ShowBackplate.GetName()); Assert.AreSame(prop, camera.ShowBackplate); prop = camera.FindProperty("Background Texture"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.BackgroundTexture); Assert.True(camera.BackgroundTexture.IsValid()); Assert.AreEqual("Background Texture", camera.BackgroundTexture.GetName()); Assert.AreSame(prop, camera.BackgroundTexture); prop = camera.FindProperty("FrontPlateFitImage"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlateFitImage); Assert.True(camera.FrontPlateFitImage.IsValid()); Assert.AreEqual("FrontPlateFitImage", camera.FrontPlateFitImage.GetName()); Assert.AreSame(prop, camera.FrontPlateFitImage); prop = camera.FindProperty("FrontPlateCrop"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlateCrop); Assert.True(camera.FrontPlateCrop.IsValid()); Assert.AreEqual("FrontPlateCrop", camera.FrontPlateCrop.GetName()); Assert.AreSame(prop, camera.FrontPlateCrop); prop = camera.FindProperty("FrontPlateCenter"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlateCenter); Assert.True(camera.FrontPlateCenter.IsValid()); Assert.AreEqual("FrontPlateCenter", camera.FrontPlateCenter.GetName()); Assert.AreSame(prop, camera.FrontPlateCenter); prop = camera.FindProperty("FrontPlateKeepRatio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlateKeepRatio); Assert.True(camera.FrontPlateKeepRatio.IsValid()); Assert.AreEqual("FrontPlateKeepRatio", camera.FrontPlateKeepRatio.GetName()); Assert.AreSame(prop, camera.FrontPlateKeepRatio); prop = camera.FindProperty("ShowFrontplate"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ShowFrontplate); Assert.True(camera.ShowFrontplate.IsValid()); Assert.AreEqual("ShowFrontplate", camera.ShowFrontplate.GetName()); Assert.AreSame(prop, camera.ShowFrontplate); prop = camera.FindProperty("FrontPlaneOffsetX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneOffsetX); Assert.True(camera.FrontPlaneOffsetX.IsValid()); Assert.AreEqual("FrontPlaneOffsetX", camera.FrontPlaneOffsetX.GetName()); Assert.AreSame(prop, camera.FrontPlaneOffsetX); prop = camera.FindProperty("FrontPlaneOffsetY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneOffsetY); Assert.True(camera.FrontPlaneOffsetY.IsValid()); Assert.AreEqual("FrontPlaneOffsetY", camera.FrontPlaneOffsetY.GetName()); Assert.AreSame(prop, camera.FrontPlaneOffsetY); prop = camera.FindProperty("FrontPlaneRotation"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneRotation); Assert.True(camera.FrontPlaneRotation.IsValid()); Assert.AreEqual("FrontPlaneRotation", camera.FrontPlaneRotation.GetName()); Assert.AreSame(prop, camera.FrontPlaneRotation); prop = camera.FindProperty("FrontPlaneScaleX"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneScaleX); Assert.True(camera.FrontPlaneScaleX.IsValid()); Assert.AreEqual("FrontPlaneScaleX", camera.FrontPlaneScaleX.GetName()); Assert.AreSame(prop, camera.FrontPlaneScaleX); prop = camera.FindProperty("FrontPlaneScaleY"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrontPlaneScaleY); Assert.True(camera.FrontPlaneScaleY.IsValid()); Assert.AreEqual("FrontPlaneScaleY", camera.FrontPlaneScaleY.GetName()); Assert.AreSame(prop, camera.FrontPlaneScaleY); prop = camera.FindProperty("Foreground Texture"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ForegroundTexture); Assert.True(camera.ForegroundTexture.IsValid()); Assert.AreEqual("Foreground Texture", camera.ForegroundTexture.GetName()); Assert.AreSame(prop, camera.ForegroundTexture); prop = camera.FindProperty("Foreground Opacity"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ForegroundOpacity); Assert.True(camera.ForegroundOpacity.IsValid()); Assert.AreEqual("Foreground Opacity", camera.ForegroundOpacity.GetName()); Assert.AreSame(prop, camera.ForegroundOpacity); prop = camera.FindProperty("DisplaySafeArea"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.DisplaySafeArea); Assert.True(camera.DisplaySafeArea.IsValid()); Assert.AreEqual("DisplaySafeArea", camera.DisplaySafeArea.GetName()); Assert.AreSame(prop, camera.DisplaySafeArea); prop = camera.FindProperty("DisplaySafeAreaOnRender"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.DisplaySafeAreaOnRender); Assert.True(camera.DisplaySafeAreaOnRender.IsValid()); Assert.AreEqual("DisplaySafeAreaOnRender", camera.DisplaySafeAreaOnRender.GetName()); Assert.AreSame(prop, camera.DisplaySafeAreaOnRender); prop = camera.FindProperty("SafeAreaDisplayStyle"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.SafeAreaDisplayStyle); Assert.True(camera.SafeAreaDisplayStyle.IsValid()); Assert.AreEqual("SafeAreaDisplayStyle", camera.SafeAreaDisplayStyle.GetName()); Assert.AreSame(prop, camera.SafeAreaDisplayStyle); prop = camera.FindProperty("SafeAreaAspectRatio"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.SafeAreaAspectRatio); Assert.True(camera.SafeAreaAspectRatio.IsValid()); Assert.AreEqual("SafeAreaAspectRatio", camera.SafeAreaAspectRatio.GetName()); Assert.AreSame(prop, camera.SafeAreaAspectRatio); prop = camera.FindProperty("Use2DMagnifierZoom"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.Use2DMagnifierZoom); Assert.True(camera.Use2DMagnifierZoom.IsValid()); Assert.AreEqual("Use2DMagnifierZoom", camera.Use2DMagnifierZoom.GetName()); Assert.AreSame(prop, camera.Use2DMagnifierZoom); prop = camera.FindProperty("2D Magnifier Zoom"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera._2DMagnifierZoom); Assert.True(camera._2DMagnifierZoom.IsValid()); Assert.AreEqual("2D Magnifier Zoom", camera._2DMagnifierZoom.GetName()); Assert.AreSame(prop, camera._2DMagnifierZoom); prop = camera.FindProperty("2D Magnifier X"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera._2DMagnifierX); Assert.True(camera._2DMagnifierX.IsValid()); Assert.AreEqual("2D Magnifier X", camera._2DMagnifierX.GetName()); Assert.AreSame(prop, camera._2DMagnifierX); prop = camera.FindProperty("2D Magnifier Y"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera._2DMagnifierY); Assert.True(camera._2DMagnifierY.IsValid()); Assert.AreEqual("2D Magnifier Y", camera._2DMagnifierY.GetName()); Assert.AreSame(prop, camera._2DMagnifierY); prop = camera.FindProperty("CameraProjectionType"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.ProjectionType); Assert.True(camera.ProjectionType.IsValid()); Assert.AreEqual("CameraProjectionType", camera.ProjectionType.GetName()); Assert.AreSame(prop, camera.ProjectionType); prop = camera.FindProperty("OrthoZoom"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.OrthoZoom); Assert.True(camera.OrthoZoom.IsValid()); Assert.AreEqual("OrthoZoom", camera.OrthoZoom.GetName()); Assert.AreSame(prop, camera.OrthoZoom); prop = camera.FindProperty("UseRealTimeDOFAndAA"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseRealTimeDOFAndAA); Assert.True(camera.UseRealTimeDOFAndAA.IsValid()); Assert.AreEqual("UseRealTimeDOFAndAA", camera.UseRealTimeDOFAndAA.GetName()); Assert.AreSame(prop, camera.UseRealTimeDOFAndAA); prop = camera.FindProperty("UseDepthOfField"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseDepthOfField); Assert.True(camera.UseDepthOfField.IsValid()); Assert.AreEqual("UseDepthOfField", camera.UseDepthOfField.GetName()); Assert.AreSame(prop, camera.UseDepthOfField); prop = camera.FindProperty("FocusSource"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FocusSource); Assert.True(camera.FocusSource.IsValid()); Assert.AreEqual("FocusSource", camera.FocusSource.GetName()); Assert.AreSame(prop, camera.FocusSource); prop = camera.FindProperty("FocusAngle"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FocusAngle); Assert.True(camera.FocusAngle.IsValid()); Assert.AreEqual("FocusAngle", camera.FocusAngle.GetName()); Assert.AreSame(prop, camera.FocusAngle); prop = camera.FindProperty("FocusDistance"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FocusDistance); Assert.True(camera.FocusDistance.IsValid()); Assert.AreEqual("FocusDistance", camera.FocusDistance.GetName()); Assert.AreSame(prop, camera.FocusDistance); prop = camera.FindProperty("UseAntialiasing"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseAntialiasing); Assert.True(camera.UseAntialiasing.IsValid()); Assert.AreEqual("UseAntialiasing", camera.UseAntialiasing.GetName()); Assert.AreSame(prop, camera.UseAntialiasing); prop = camera.FindProperty("AntialiasingIntensity"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AntialiasingIntensity); Assert.True(camera.AntialiasingIntensity.IsValid()); Assert.AreEqual("AntialiasingIntensity", camera.AntialiasingIntensity.GetName()); Assert.AreSame(prop, camera.AntialiasingIntensity); prop = camera.FindProperty("AntialiasingMethod"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.AntialiasingMethod); Assert.True(camera.AntialiasingMethod.IsValid()); Assert.AreEqual("AntialiasingMethod", camera.AntialiasingMethod.GetName()); Assert.AreSame(prop, camera.AntialiasingMethod); prop = camera.FindProperty("UseAccumulationBuffer"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.UseAccumulationBuffer); Assert.True(camera.UseAccumulationBuffer.IsValid()); Assert.AreEqual("UseAccumulationBuffer", camera.UseAccumulationBuffer.GetName()); Assert.AreSame(prop, camera.UseAccumulationBuffer); prop = camera.FindProperty("FrameSamplingCount"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrameSamplingCount); Assert.True(camera.FrameSamplingCount.IsValid()); Assert.AreEqual("FrameSamplingCount", camera.FrameSamplingCount.GetName()); Assert.AreSame(prop, camera.FrameSamplingCount); prop = camera.FindProperty("FrameSamplingType"); Assert.NotNull(prop); Assert.True(prop.IsValid()); Assert.NotNull(camera.FrameSamplingType); Assert.True(camera.FrameSamplingType.IsValid()); Assert.AreEqual("FrameSamplingType", camera.FrameSamplingType.GetName()); Assert.AreSame(prop, camera.FrameSamplingType); }
protected override FbxScene CreateScene(FbxManager manager) { FbxScene scene = base.CreateScene(manager); FbxNode cameraNode = scene.GetRootNode().GetChild(0); FbxCamera camera = FbxCamera.Create(scene, "camera"); camera.ProjectionType.Set(FbxCamera.EProjectionType.ePerspective); camera.SetAspect(FbxCamera.EAspectRatioMode.eFixedRatio, 300, 400); camera.FilmAspectRatio.Set(240); camera.SetApertureWidth(4); camera.SetApertureHeight(2); camera.SetApertureMode(FbxCamera.EApertureMode.eFocalLength); camera.FocalLength.Set(32); camera.SetNearPlane(1); camera.SetFarPlane(100); // create custom property (background color) var bgColorProperty = FbxProperty.Create(cameraNode, Globals.FbxColor4DT, "backgroundColor"); Assert.IsTrue(bgColorProperty.IsValid()); bgColorProperty.Set(new FbxColor(0.5, 0.4, 0.1, 1)); // Must be marked user-defined or it won't be shown in most DCCs bgColorProperty.ModifyFlag(FbxPropertyFlags.EFlags.eUserDefined, true); bgColorProperty.ModifyFlag(FbxPropertyFlags.EFlags.eAnimatable, true); Assert.IsTrue(bgColorProperty.GetFlag(FbxPropertyFlags.EFlags.eUserDefined)); Assert.IsTrue(bgColorProperty.GetFlag(FbxPropertyFlags.EFlags.eAnimatable)); // create custom property (clear flags) var clearFlagsProperty = FbxProperty.Create(cameraNode, Globals.FbxIntDT, "clearFlags"); Assert.IsTrue(clearFlagsProperty.IsValid()); clearFlagsProperty.Set(4); // Must be marked user-defined or it won't be shown in most DCCs clearFlagsProperty.ModifyFlag(FbxPropertyFlags.EFlags.eUserDefined, true); clearFlagsProperty.ModifyFlag(FbxPropertyFlags.EFlags.eAnimatable, true); Assert.IsTrue(clearFlagsProperty.GetFlag(FbxPropertyFlags.EFlags.eUserDefined)); Assert.IsTrue(clearFlagsProperty.GetFlag(FbxPropertyFlags.EFlags.eAnimatable)); // Add camera properties to animation clip FbxAnimStack animStack = scene.GetCurrentAnimationStack(); FbxAnimLayer animLayer = animStack.GetAnimLayerMember(); // TODO: (UNI-19438) Figure out why trying to do GetCurve for NearPlane always returns null CreateAnimCurves(cameraNode, animLayer, new List <PropertyComponentPair> () { new PropertyComponentPair("backgroundColor", new string[] { Globals.FBXSDK_CURVENODE_COLOR_RED, Globals.FBXSDK_CURVENODE_COLOR_GREEN, Globals.FBXSDK_CURVENODE_COLOR_BLUE, "W" }), new PropertyComponentPair("FocalLength", new string[] { null }), new PropertyComponentPair("clearFlags", new string[] { null }) }, (index) => { return(index); }, (index) => { return(index / 5.0f); }, camera); cameraNode.SetNodeAttribute(camera); // set the default camera scene.GetGlobalSettings().SetDefaultCamera(cameraNode.GetName()); return(scene); }