
Q: Problem with displaying geometry in PROTOS
Hello-
I am working on a project where I have several PROTO's arranged in a
hierarchy; PROTO A contains a node for geometry which is implemented by
IS'n to a Group's children field. PROTO B contains a field to hold a
node of PROTO A; PROTO C has a field for holding a node of PROTO B.
When I instantiate PROTO A, B, and C, nothing is displayed. When I use
PROTO A alone, all is well. Any help?
Here is some example code:
PROTO protoA [field MFNode visualDef []] {
Group {
children IS visualDef
}
}
PROTO protoB [field SFNode protoAField NULL
eventIn SFBool flag] {
DEF internShape Shape {
geometry IS protoAField
}
Script {
field SFNode intern_field USE internShape
eventIn SFBool intern_Flag IS flag
....do stuff....
}
}
PROTO protoC [field MFNode protoBField []] {
Group {
children IS protoBField
}
}
and then I instantiate it as follows:
protoC {
protoBField [
protoB {
protoAField protoA {
visualDef [
Shape {
geometry Box {}
}
]
}
}
]
}
Why does this not display the box ?