tv_camerapath details

A forum dedicated to George scripting questions
Post Reply
rlahmidi
Posts: 1
Joined: 04 Jun 2022, 01:39

tv_camerapath details

Post by rlahmidi »

Hello, I'm trying to understand how to use the function tv_camerapath https://www.tvpaint.com/doc/tvpaint-ani ... camerapath. I have a test scene with an animated camera and multiple points, and the documentation states that the key:value for profile returns (I'm just showing the part I'm interested in):

Code: Select all

"profile"               profile          The profile
iCount                  int              The number of point x,y
iCurrent                int              The current point
0|1|2                   enum             The interpolation
                                         _ 0: spline
                                         _ 1: linear
                                         _ 2: polynomial
                        array            The keys
iX1 iY1                 double double    
iX2 iY2                 double double    
...                                      
iXn iYn                 double double    
but when I call tv_camerapath (as a getter) I get this :

Code: Select all

profile "2 0 1 0 0 1 1"
(this again is just part of the returned values, specifically the profile part), which is supposed to mean that I have

Code: Select all

iCount = 2
iCurrent = 0
interpolation = 1
and then two points : 
P1 = (0, 0)
P2 = (1, 1)
The thing is I have more than two points and none of them are in the specified position. and current point always returns 0. Mind you the documentation does specify that it returns keys not points, but I don't know what that means and just assumed that it was talking about points. The documentation is not very clear about what this function actually does, the returns values as well as the parameters are not very clear either. I might be misunderstanding this, so if anyone has any experience with this function and can actually tell me what it does and how to use it properly (as getter and setter) it would be much appreciated. Here's a screenshot of what I have right now (don't mind the amazing art ^^' )

P.S : answering in french works too ^^

Image
Post Reply