Amazon VERSION 2.0V1 Podręcznik Użytkownika Strona 187

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 264
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 186
187
}
interface.execOp(opType.getValue("", false), opArgs);
}
}
The deleteSelf() Function
void deleteSelf();
Thus far, we have only seen mechanisms to add data to the scene graph, but the deleteSelf() function and the
associated function deleteChild() allow you to remove locations from the scene graph. Their behavior is self-
explanatory but their side effects are less intuitive and are explained fully in Reading Scene Graph Input. For now,
however, an example for what a Prune Op may look like by using the deleteSelf() function call is shown below:
// Use CEL Utility function to evaluate CEL expression
FnAttribute::StringAttribute celAttr = interface.getOpArg("CEL");
if (!celAttr.isValid())
return;
Foundry::Katana::MatchesCELInfo info;
Foundry::Katana::MatchesCEL(info, interface, celAttr);
if (!info.matches)
return;
// Otherwise, delete myself
interface.deleteSelf();
return;
The stopChildTraversal() Function
void stopChildTraversal();
The stopChildTraversal() function is one of the functions that allows you to control on which locations your Op is
run. It stops the execution of this Op at any child of the current location being evaluated. It is best explained by way
of example.
Say we have an input scene:
/root
/world
/light
Say what we want is:
/root
/world
24 OP API | THE OP API EXPLAINED
Przeglądanie stron 186
1 2 ... 182 183 184 185 186 187 188 189 190 191 192 ... 263 264

Komentarze do niniejszej Instrukcji

Brak uwag