Re: pfFind : Ambiguous pathname

New Message Reply Date view Thread view Subject view Author view

Lance R. Marrou (marrou++at++vsl.ist.ucf.edu)
Wed, 19 Apr 1995 13:53:51 -0400 (EDT)


On Wed, 19 Apr 1995, Marc SIMON Presales support wrote:

> Is there a way to manage several nodes with exactly the same name
> (multiple load of the same object) with the "pfFind*" features.
>
> It seems thst when multiple we have multiple identical nodes in the same
> scene " pfFind*" always return that there is a ambiguous pathname .
>
> Is there a way to avoid this ???
>
> Perhaps in 2.0 ???

You need to specify the path for the node. Of course, if you have randomly
placed nodes in no particular path, then you have a problem (but one you
created yourself). One use I have is to find DCSes in a model based upon the
DCS node name as such:

  if (!dcs) return;

  char path[100];
  char name[100];

  strcpy(path, "/");
  strcat(path, pfGetNodeName(dcs));
  strcat(path, "/");

  strcpy(name,path);
  b1 = pfFindDCS(strcat(name, "Bar1"));
  if (!b1)
    notify(NOTIFY_WARN,"Could not find b1 (Bar1) DCS for the breacher\n");

  strcpy(name,path);
  b2 = pfFindDCS(strcat(name, "Bar2"));
  if (!b2)
    notify(NOTIFY_WARN,"Could not find b2 (Bar2) DCS for the breacher\n");

...

Note that "dcs" MUST have a unique name. For this, I keep a static variable
which increments every time I load (actually, clone) a new model. All the
cloned geometry keeps the names.

______________________________________________________________________________
           /\ ______ /\____ ______ ______ E-mail: marrou++at++vsl.ist.ucf.edu
Visual / / / _ / / __ // ____// ____/ VSL: (407)658-5073
Systems / /__ / /_/ / / / / // /___ / __/_ R. Marrou Fax: (407)658-5059
Lab /____//____/\\/_/ /_//_____//_____/ http://www.vsl.ist.ucf.edu/~marrou
"Reap the whirlwind." "We don't need no thought control."


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:24 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.