AnimateDocument -> Expressions
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 02:00, xxxxxxxx wrote:
Please attach the scene, thanks.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 06:31, xxxxxxxx wrote:
Here you go: Link
(keep in mind that I suck at animations - just no experience with them yet) -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 06:54, xxxxxxxx wrote:
...btw, to find the problem, I just altered my code above from this:
/* -- S N I P -- */ //---------------------------------------------------------------- // clean up and prep for next frame //---------------------------------------------------------------- EndOBJFile(); BaseDocument::Free(m_baseDoc); m_baseDoc = NULL; m_fileSeq++; /* -- S N I P -- */
...to this:
/* -- S N I P -- */ //---------------------------------------------------------------- // clean up and prep for next frame //---------------------------------------------------------------- EndOBJFile(); if( i == 20 ) InsertBaseDocument(m_baseDoc); else BaseDocument::Free(m_baseDoc); m_baseDoc = NULL; m_fileSeq++; /* -- S N I P -- */
...so the code added frame 20 as a new document, so I could see what it looked like. At that point, I could see that the "Top-Target" null object was missing and that the links to it were broken.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 07:51, xxxxxxxx wrote:
Hmm... it broke again... (even with the hidden cube there). Still investigating.
...I guess that was just not a reliable 'fix'. Even with the invisible cube there to keep the Null around, the expression is not being evaluated (the Xpresso tag and Target tag are still correctly referencing the "Top-Target" null, but it's just not affecting the sphere object like it should be). -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 08:09, xxxxxxxx wrote:
BTW, just to be clear, this is a R10.1 SDK compiled plugin, but being used in R10.5
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/11/2008 at 08:18, xxxxxxxx wrote:
...seems to be an issue related to the 'Priority' of the Xpresso and Target tags... I was following that guide link I posted above and changed the priorities to "Generators" 1 and 2, but I get different results if I reset them back to "Expression" 0 and 10 priorities (thier defaults). But I still need the hidden cube to keep the Top-Target null around.
EDIT: sorry, I may have spoke too soon... the results just kind of seem to be random - even with the "Expression" priorities, I'm back where I started - sometimes it kinda works (maybe off by a frame) and sometimes the sphere doesn't move at all. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/11/2008 at 02:08, xxxxxxxx wrote:
It seems you have to use Polygonize(FALSE). This code works fine for me with your attached example scene.
>
\> Bool MenuTest::Execute(BaseDocument \*doc) \> { \> StopAllThreads(); \> \> Filename fdir; \> if(!fdir.FileSelect(FSTYPE_ANYTHING, GE_DIRECTORY, "Select Directory")) return TRUE; \> \> Real fps = doc->GetFps(); \> LONG i, frames = doc->GetMaxTime().GetFrame(fps); \> \> for(i=0; i<frames; i++) \> { \> StopAllThreads(); \> \> Filename fn("frame"+LongToString(i)); \> fn.SetDirectory(fdir); \> fn.SetSuffix("obj"); \> GePrint(fn.GetString()); \> \> doc->SetTime(BaseTime(i,fps)); \> doc->AnimateDocument(NULL, TRUE, TRUE); \> EventAdd(); \> DrawViews(DA_FORCEFULLREDRAW, NULL); \> \> BaseDocument \*pdoc = NULL; \> pdoc = doc->Polygonize(FALSE); \> if(!pdoc) return FALSE; \> \> if(!SaveDocument(pdoc, fn, SAVEFLAG_DONTADDTORECENTLIST, FORMAT_OBJEXPORT)) \> { \> BaseDocument::Free(pdoc); \> return FALSE; \> } \> \> BaseDocument::Free(pdoc); \> } \> \> return TRUE; \> } \>
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/11/2008 at 06:21, xxxxxxxx wrote:
How odd - but... whatever works - thanks Matthias!
That DrawViews() helps a lot too ;). -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/11/2008 at 08:26, xxxxxxxx wrote:
A final question about this... does anyone know how I might add some sort of "Abort" checking in that loop?
I see that the Thread class has a thread->TestDBreak() that could be overloaded (to check for ESC pressed, for example), but I'm not using my own thread.
I tried adding a non-modal 'Progress' type dialog with a Cancel button on it, but that dialog's Command() routine never gets called (I'm assuming this has to do with the StopAllThreads() being called repeatedly).
Is there some system call that will allow me to give up the cpu long enough to check for events or some other way of letting the user hit ESC or click on some button to Abort the process? (writing out 400 .obj files and animating a complex scene for each of those 400 frames might take a long time).
Any help or suggestions would be appreciated. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/11/2008 at 09:39, xxxxxxxx wrote:
Update:
I'm actually calling a routine in my non-modal dialog to set the current filename before opening each file for writing. Since this is a good spot to 'abort' anyway, I've figured out that I can call GetInputEvent(BFM_INPUT_KEYBOARD, msg) from within that routine and check for ESC pressed there. So far, so good.
The issue I'm still having is that my 'Cancel' button is still not working (the dialog's Command() routine is never called) and I'm also having trouble with updating the dialog's display after changing values (setting the filename string in a Static Text gadget, for example).
Since I've set an hour-glass cursor anyway, I may just get rid of the Cancel button and replace that with some text that says "Press ESC to Cancel", but I'd still like to get the dialog display updates working... is there some way to force it to redraw itself? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/11/2008 at 10:41, xxxxxxxx wrote:
...nevermind... it seems that my problem is with trying to use a Static Text element as a Dynamic String element (the number of characters displayed is set in stone on creation), so it was not showing the new string.
Now I just need to figure out which dialog element/gadget type to use (or initialize the Static Text with a longer string, or.. something). -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/11/2008 at 12:43, xxxxxxxx wrote:
SetString() is the correct way for Static Text. I think you can set the display size using the width part of AddStaticText() - but you must set the value carefully (SizePix(), SizeChr(), etc. for best results).
You need to call GeUserArea::Redraw().
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/11/2008 at 12:56, xxxxxxxx wrote:
Thanks... I figured out my problem - not enough coffee ;).