Randy Stiles (stiles++at++aic.lockheed.com)
Fri, 23 Feb 1996 19:38:23 -0800
Its been my experience with the Inventor loader in Performer 2.1 that
if you DEF the nodes you want to keep, they are not removed.
i.e.
DEF anitas_sw Switch {
...
}
This is pretty useful for more than just maintaining structure.
The name you assign in DEF becomes the pfNodeName for the pfSwitch
as well.
-Randy
Anita Kishore wrote:
>
> I am not able to prevent a particular pfSwitch node from being cleaned
> up by the .iv loader. I have the pfiv.c++ that came with Performer2.0, a151.
>
> In the routine "loadIv" of pfiv.c++, the following calls are made by the loader
> towards the end:
>
> if (DoFlatten)
> {
> result = pfdFreezeTransforms(result, NULL);
> result->flatten(0);
> }
>
> if (DoClean)
> result = pfdCleanTree(result, NULL);
>
> if (result != NULL)
> result->setName(file);
>
> The pfSwitch that I am interested in has 1 child. According to the man pages
> of pfdCleanTree, the switch shouldn't be removed if it has atleast one child.
> I have checked this by putting printfs after pfdFreezeTransforms, pfdCleanTree
> and result->setName steps. The pfSwitch exists after pfdFreezeTransforms, and
> pfdCleanTree. But is no longer there after result->setName. I used result->find
> to check this. I have also tried by giving my own function to pfdCleanTree
> which returns TRUE for all nodes except the one pfSwitch that I want. But I see
> the same incorrect behaviour even then. If I comment the step
> "result->setName", then it is OK.
>
> What is going on? Any one?
>
> thanks for any input
>
> -anita
>
> ------------------------------------------------------------------------
> Anita Kishore
> kishore++at++electrogig.com
> ------------------------------------------------------------------------
-- // Randy Stiles stiles++at++aic.lockheed.com Orgn 9620 Bldg 255 // 415.354.5256 fax: 415.354.5235 3251 Hanover Street // Lockheed Martin Advanced Technology Center Palo Alto, CA 94304-1187 // http://vet.parl.com/~vet/people/stiles/
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:27 PDT