PDA

View Full Version : AddUndo() issue


fish-msk
11-06-2010, 09:16 AM
Hi!

A simple AddUndo() example from SDK R12 Help causes error: "Variable or function expected"

main(doc,op)
{
doc->StartUndo();
doc->AddUndo(OBJECT_BASEDATA, op);
op->SetName("Change");
doc->AddUndo(OBJECT_BASEDATA, op);
op->SetPosition(vector(100,0,0));
doc->EndUndo();
}

What's wrong with the script? (I've created a cube and added COFFEE tag to it. I'm using R12.021)

kvb
11-06-2010, 10:00 AM
Look below the example at the various types of undo's and replace that OBJECT_BASEDATA with one of those.

I think in that example it was originally supposed to be UNDO_OBJECT_BASEDATA, just a typo that was forgotten about. With the changes to that function in R12 you'd think it would have been caught, cuz that example is exactly the same in the R9.5 SDK and it was wrong then:D

-kvb

CGTalk Moderation
11-06-2010, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.