Announcement

Collapse
No announcement yet.

Getting the keyframes of a sub-channel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting the keyframes of a sub-channel

    I imported a geometry that comes from a 3D application. It has Position and Rotation keyframes, but they are sub-channels of the Position and Rotation channels.
    I mean, for example, I have the Position channel and, below it, I have X, Y and Z channels.
    How can I access the X, Y and Z channels independently?
    I can only seem to get access to the Position channel using:

    chn = this.FindChannelOfObject("Position")

    And, when I try to get the number of keyframes with:

    chn.KeyframeCount

    I get 0 (zero).

  • #2
    I realized that the X, Y and Z keyframes are the Position and Rotation channels splitted.
    Is there any way to access the splitted components?

    Comment


    • #3
      did you try something like
      Code:
      dim cContainer as Container
      cContainer = this
      dim vPos as Vertex
      vPos = cContainer.Position.xyz
      dim vRot as Vertex
      vRot = cContainer.Rotation.xyz
      'if you need the individual axis' you can use e.g. cContainer.Position.x

      Comment


      • #4
        Originally Posted by Lars Henriksen View Post
        did you try something like
        Code:
        dim cContainer as Container
        cContainer = this
        dim vPos as Vertex
        vPos = cContainer.Position.xyz
        dim vRot as Vertex
        vRot = cContainer.Rotation.xyz
        'if you need the individual axis' you can use e.g. cContainer.Position.x
        I need to access the coordinates of the container for each frame.
        I have a geometry that I import and it includes a keyframe for each frame, but they are splitted.
        So, I need to access through code, the number of keyframes and the value of each keyframe. And I don't seem to be able to do that.

        Comment


        • #5
          Have a look at this archive. All files here should help you. This was a C4D camera export and import to Viz. I didnt do it, Rob Chen from Promotheus did and this was a nugget I saved. Hope it can guide you a bit on the scripting side. https://www.dropbox.com/s/cr9feykmf2...theus.zip?dl=0

          Comment


          • #6
            Originally Posted by Lars Henriksen View Post
            Have a look at this archive. All files here should help you. This was a C4D camera export and import to Viz. I didnt do it, Rob Chen from Promotheus did and this was a nugget I saved. Hope it can guide you a bit on the scripting side. https://www.dropbox.com/s/cr9feykmf2...theus.zip?dl=0
            This is amazing. It has came "full circle". The c4d scripts that are in that link use a node created by me, that the author asked me to send it, some years ago.
            However, the programming language used was discontinued... so I will update it. Thank you. I will look into it.

            Comment


            • #7
              Sharing is caring

              Comment

              Working...
              X