PDA

View Full Version : Anyone have a working example of OFOLD?


Scott Ayers
11-12-2010, 05:39 PM
I've had all kinds of problems getting certain BITS to work. They seem to act very flakey.
One of them is the SetBit(BIT_OFOLD) function.
I recently discovered by accident that it seemed to only work when all of the objects in the tree were selected. But then I couldn't recreate that same working example anymore. It just all of a sudden stopped working!

This unfold command works: CallCommand(100004802);
But there are times when I want to do it with the raw coffee function so I can package it into my undo stack.

Does anyone have a script example where the SetBit(BIT_OFOLD) function is working properly?

-ScottA

Cairyn
11-12-2010, 05:48 PM
I've had all kinds of problems getting certain BITS to work. They seem to act very flakey.
One of them is the SetBit(BIT_OFOLD) function.
I recently discovered by accident that it seemed to only work when all of the objects in the tree were selected. But then I couldn't recreate that same working example anymore. It just all of a sudden stopped working!


If I remember correctly, the BIT_OFOLD is obsolete and should not work at all. When the 4 object manager windows were introduced (I forgot the version when that happened), each OM got its own folding bit, e.g. NBIT_OM1_FOLD.

Here's an excerpt from the CollieTools, perhaps it helps, although it's C++:

Bool CCollieFoldApplier::DoApply (BaseObject* p_pTarget)
{
if (p_pTarget == NULL) return TRUE;

// NOTE: Fold and unfold operations are not part of the undo system,
// so we won't make undo possible here!
switch (m_nObjectManager)
{
case 1: p_pTarget->ChangeNBit(NBIT_OM1_FOLD, m_bUnfold ? NBIT_SET : NBIT_DEL); break;
case 2: p_pTarget->ChangeNBit(NBIT_OM2_FOLD, m_bUnfold ? NBIT_SET : NBIT_DEL); break;
case 3: p_pTarget->ChangeNBit(NBIT_OM3_FOLD, m_bUnfold ? NBIT_SET : NBIT_DEL); break;
case 4: p_pTarget->ChangeNBit(NBIT_OM4_FOLD, m_bUnfold ? NBIT_SET : NBIT_DEL); break;
default: break;
}
return TRUE;
}

Scott Ayers
11-12-2010, 06:09 PM
Shazbot! (Dating myself a bit there ;))

I wish they would do a better job of updating the Coffee SDKs better.
Things like this are still in the the R12 SDK. While important working stuff like the SendModeling commands got mysteriously wacked for no good reason.

It's things like this that makes me think that Maxon hates the Coffee language. And does this stuff intentionally so people will stop using it.

Thanks Robert
-ScottA

CGTalk Moderation
11-12-2010, 06:09 PM
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.