Allocating Track types and loops
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/11/2006 at 13:23, xxxxxxxx wrote:
Thank you very much, Matthias!
Now for the fun part. After that, PLA keys still need to be allocated and, worst of all, their data set with the changed points. I see that the ckpla.res file has this:
REAL CK_PLA_BIAS { UNIT PERCENT; MIN -100.0; MAX 100.0; }
BOOL CK_PLA_CUBIC { }
PLADATATYPE CK_PLA_DATA { }My best guess is that PLADATATYPE CK_PLA_DATA is where either the VariableTag with the points is stored or the points directly (?). I'm leaning towards the latter since this appears to be a custom data type, not just a link or something.
Again, thank you for your work so far!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/11/2006 at 08:25, xxxxxxxx wrote:
Sorry I have no answer for the key allocation yet. I will let you know when I know how to do so.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/11/2006 at 03:21, xxxxxxxx wrote:
Here is how you can write PLA keys. It works like this, change the points in your object, then run FillKey, after this reset points if needed. Little code exapmle:
CTrack *mytrack = CTrack::Alloc(op,DescLevel(ID_ANIM_PLA,ID_ANIM_PLA,0)); if(mytrack) op->InsertTrackSorted(mytrack); CCurve *seq=mytrack->GetCurve(); if (!seq) return FALSE; BaseTime time = BaseTime(0); CKey *key = seq->AddKey(time); if (!key) return FALSE; if (!mytrack->FillKey(doc,op,key)) return FALSE;
hope this helps
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/11/2006 at 07:11, xxxxxxxx wrote:
Is there a similar way to migrate COFFEE scripts for PLA keys allocation?
Thanks...
Riccardo -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/11/2006 at 12:38, xxxxxxxx wrote:
Thank you very much, Matthias.
A quick question. So, if I'm converting standard animation of a polygon object to PLA animation, I would just animate (AnimateTrack() or whatnot) as before (as this changes the points on the object) and then run FillKey to set those current points as the PLA point data?
Will try this out soon (too many things happening at once here!).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/11/2006 at 12:52, xxxxxxxx wrote:
Quote: Originally posted by kuroyume0161
>
> * * *
>
> A quick question. So, if I'm converting standard animation of a polygon object to PLA animation, I would just animate (AnimateTrack() or whatnot) as before (as this changes the points on the object) and then run FillKey to set those current points as the PLA point data?
>
>
> * * *yes, that should do the trick. afaik there is a more convenient way to this planned for future sdk versions, but for now this is the way to go.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/12/2006 at 07:58, xxxxxxxx wrote:
Thank you, Matthias. Now it seems, that I can fix all my animation code to R10. One little question:
I'm using DelKey(index) to delete obsolete keys after creating my tracks and keys for every frame. Do I have to add CKey::Free() all the same or does DelKey() do it for me? In R9 I used
key->Remove();
BaseKey::Free(key);
now I just use
seq->DelKey(index);Is that clean?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/12/2006 at 13:24, xxxxxxxx wrote:
delighted too early.
The optimization I described above works fine with value keys, but I can't figure out how to access the data of data keys. I use the following code to write data keys and that works:
track = op->FindCTrack(descID); if (!track) { track = CTrack::Alloc(op, descID); if (!track) return FALSE; op->InsertTrackSorted(track); } seq = track->GetCurve(); if (!seq) return FALSE; key = seq->AddKey(time); if (!key) return FALSE; // key->SetGeData(seq, data); <<-- DOESN'T WORK if (!track->FillKey(doc, op, key)) return FALSE;
But how can I access the data? I tried it with:
track = op->FindCTrack(descID); // check if track exists if (!track) return; seq = track->GetCurve(); if (!seq) return; nKeys = seq->GetKeyCount(); if (nKeys < 2) return; key = seq->GetKey(0); if (!key) return; data = key->GetGeData(); type = data.GetType(); if ((type != DA_REAL) && (type != DA_LONG) && (type != DA_STRING)) return;
type is always NIL, except if it is a string(!), very curious. The code also works for data keys that record visibilities (e.g. ID_BASEOBJECT_VISIBILITY_EDITOR). Again: The tracks and keys are ok, as checked in the timeline. I also tried key->GetParameter(descID, data, 0)), but that fails.
<some times later...>
Now I use a (hopefully temporary) workaround with key->GetValue(), if none of the supported types can't be detected. Curiously, that works. Looks not clean, looks buggy.
Waiting for the SDK 10...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/12/2006 at 14:42, xxxxxxxx wrote:
Ok, back to PLA. Writing keys as described above by Matthias works fine. Step by step I'll get an understanding of the new animation system. It seems to be much clearer and easier especially by this FillKey() killer function.
But again I have the problem, that I can't figure out, how to get access to the PLA key data. Formerly, there was a tag, that stored the points. How is it organized now?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/03/2007 at 05:49, xxxxxxxx wrote:
Hi Robert!
Have you found out anything more on the track allocation matter? Like for allocating plugin tracks?
/Jonas
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 06/03/2007 at 07:05, xxxxxxxx wrote:
PLA data access is currently not possible in R10.0.
This will be fixed with the next bugfix update.