|
|
@@ -250,6 +250,7 @@ void DAEToEggConverter::process_node(PT(EggGroupNode) parent, const FCDSceneNode
|
|
|
}
|
|
|
// Create an egg group for this node
|
|
|
PT(EggGroup) node_group = new EggGroup(node_id);
|
|
|
+ process_extra(node_group, node->GetExtra());
|
|
|
parent->add_child(node_group);
|
|
|
// Check if its a joint
|
|
|
if (node->IsJoint()) {
|
|
|
@@ -617,6 +618,32 @@ void DAEToEggConverter::process_controller(PT(EggGroup) parent, const FCDControl
|
|
|
_table->add_child(character->as_egg_bundle());
|
|
|
}
|
|
|
|
|
|
+void DAEToEggConverter::process_extra(PT(EggGroup) group, const FCDExtra* extra) {
|
|
|
+ if (extra == NULL) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ nassertv(group != NULL);
|
|
|
+
|
|
|
+ const FCDEType* etype = extra->GetDefaultType();
|
|
|
+ if (etype == NULL) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const FCDENode* enode = (const FCDENode*) etype->FindTechnique("PANDA3D");
|
|
|
+ if (enode == NULL) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ FCDENodeList tags;
|
|
|
+ enode->FindChildrenNodes("param", tags);
|
|
|
+ for (FCDENodeList::iterator it = tags.begin(); it != tags.end(); ++it) {
|
|
|
+ const FCDEAttribute* attr = (*it)->FindAttribute("sid");
|
|
|
+ if (attr) {
|
|
|
+ group->set_tag(FROM_FSTRING(attr->GetValue()), (*it)->GetContent());
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
LMatrix4d DAEToEggConverter::convert_matrix(const FMMatrix44& matrix) {
|
|
|
LMatrix4d result = LMatrix4d::zeros_mat();
|
|
|
for (char x = 0; x < 4; ++x) {
|