<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Open Reality SDK, the class HFBCamera members Near and Far are not Animatable even the UI allow to Animate them in MotionBuilder Forum</title>
    <link>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10742278#M635</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Alain&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if I've understood you correctly, but in python you can use something like this to get the 'frame' and 'value' of a keyframe on the Near Plane property of a camera...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyfbsdk import*

camera_obj = FBFindModelByLabelName("Camera")

cam_near_plane_anim_node = camera_obj.AnimatableNearPlane.GetAnimationNode()

if cam_near_plane_anim_node:
    for curve_key in cam_near_plane_anim_node.FCurve.Keys:
        frame = FBTime.GetFrame(curve_key.Time, FBPlayerControl().GetTransportFps())
        value = curve_key.Value
        print "Camera Near Plane has value {} on frame {}".format(value, frame)
else:
    print "Camera Near Plane is not animated"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;</description>
    <pubDate>Mon, 08 Nov 2021 10:43:31 GMT</pubDate>
    <dc:creator>Mocappy</dc:creator>
    <dc:date>2021-11-08T10:43:31Z</dc:date>
    <item>
      <title>Using Open Reality SDK, the class HFBCamera members Near and Far are not Animatable even the UI allow to Animate them</title>
      <link>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10738275#M634</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;My names is Alain Guyet, CTO at Asobo Studio France, working a AAA titles as MSFS 2020 and The Plague Tale.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to export Near &amp;amp; Far HFBCamera members, this work, but i can't find a way to export them if they are animated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the header there's a back comp comment (inserted below), and i didn't succeed to retrieve animated Near&amp;amp;Far Node and Curve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;////////////////WARNING////////////////////////////////////&lt;BR /&gt;BACK-COMP implementation:&lt;BR /&gt;The proper implementation is to change UseDepthOfField from&lt;BR /&gt;FBPropertyBool to FBPropertyAnimatableBool. This breaks&lt;BR /&gt;backward compatibility and should only be done for major releases&lt;BR /&gt;////////////////WARNING////////////////////////////////////&lt;BR /&gt;&lt;BR /&gt;void GetAnimatableFarPlane(FBPropertyAnimatableDouble *pProp);&lt;BR /&gt;void GetAnimatableNearPlane(FBPropertyAnimatableDouble *pProp);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, i&amp;nbsp;try to use this (code below), to find the&amp;nbsp;FBPropertyFCurve that should contain all keyframed Near or Far values, but the GetAnimatedNode is null.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;FBPropertyAnimatableDouble nearPlaneAnimatable;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;pCamera-&amp;gt;GetAnimatableFarPlane(&amp;amp;nearPlaneAnimatable);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if(nearPlaneAnimatable.GetAnimationNode()!=NULL)&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FBPropertyFCurve &amp;amp;curve=nearPlaneAnimatable.GetAnimationNode()-&amp;gt;FCurve;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So could you help me ? Maybe there's another way i didn't find, i think the SDK didn't match the MotionBuilder 2019, so if it's the case a code sample will be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 15:14:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10738275#M634</guid>
      <dc:creator>aguyet</dc:creator>
      <dc:date>2021-11-05T15:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using Open Reality SDK, the class HFBCamera members Near and Far are not Animatable even the UI allow to Animate them</title>
      <link>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10742278#M635</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Alain&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if I've understood you correctly, but in python you can use something like this to get the 'frame' and 'value' of a keyframe on the Near Plane property of a camera...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyfbsdk import*

camera_obj = FBFindModelByLabelName("Camera")

cam_near_plane_anim_node = camera_obj.AnimatableNearPlane.GetAnimationNode()

if cam_near_plane_anim_node:
    for curve_key in cam_near_plane_anim_node.FCurve.Keys:
        frame = FBTime.GetFrame(curve_key.Time, FBPlayerControl().GetTransportFps())
        value = curve_key.Value
        print "Camera Near Plane has value {} on frame {}".format(value, frame)
else:
    print "Camera Near Plane is not animated"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 10:43:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10742278#M635</guid>
      <dc:creator>Mocappy</dc:creator>
      <dc:date>2021-11-08T10:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using Open Reality SDK, the class HFBCamera members Near and Far are not Animatable even the UI allow to Animate them</title>
      <link>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10747566#M636</link>
      <description>&lt;P&gt;Hello and sorry if my message wasn't enough clear.&lt;/P&gt;&lt;P&gt;Thanks for the phyton sample, it work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i&amp;nbsp;don't use python to export , i&amp;nbsp;use the C++ SDK, since a while now and i don't want to migrate to phyton.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So using the OpenReality SDK, the C++ FBCamera class didn't expose the animatable property for Near and Far, check below the class provided by the SDK.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;class FBSDK_DLL FBCamera : public FBModel {&lt;BR /&gt;__FBClassDeclare( FBCamera,FBModel );&lt;BR /&gt;public:&lt;BR /&gt;....&lt;BR /&gt;FBPropertyDouble NearPlaneDistance; //!&amp;lt; &amp;lt;b&amp;gt;Read Write Property:&amp;lt;/b&amp;gt; Near plane distance.&lt;BR /&gt;FBPropertyDouble FarPlaneDistance; //!&amp;lt; &amp;lt;b&amp;gt;Read Write Property:&amp;lt;/b&amp;gt; Far plane distance.&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;/*&lt;BR /&gt;////////////////WARNING////////////////////////////////////&lt;BR /&gt;BACK-COMP implementation:&lt;BR /&gt;The proper implementation is to change UseDepthOfField from&lt;BR /&gt;FBPropertyBool to FBPropertyAnimatableBool. This breaks&lt;BR /&gt;backward compatibility and should only be done for major releases&lt;BR /&gt;////////////////WARNING////////////////////////////////////&lt;BR /&gt;*/&lt;BR /&gt;void GetAnimatableFarPlane(FBPropertyAnimatableDouble *pProp);&lt;BR /&gt;void GetAnimatableNearPlane(FBPropertyAnimatableDouble *pProp);&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try using the&amp;nbsp;GetAnimatableNearPlane(FBPropertyAnimatableDouble *pProp) that seem to be a workaround, but it didn't work.&lt;/P&gt;&lt;P&gt;Could you transfer my problem to someone who knows the c++ sdk, i believe the phyton is more up to date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 10:44:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/motionbuilder-forum/using-open-reality-sdk-the-class-hfbcamera-members-near-and-far/m-p/10747566#M636</guid>
      <dc:creator>aguyet</dc:creator>
      <dc:date>2021-11-10T10:44:01Z</dc:date>
    </item>
  </channel>
</rss>

