Mercurial > audlegacy
diff Plugins/Visualization/paranormal/pn/pnvis.c @ 1527:e05ee730df6b trunk
[svn] - possible tweak to make loading work?
author | nenolod |
---|---|
date | Mon, 07 Aug 2006 23:16:21 -0700 |
parents | 98a9c54459f0 |
children | 4319ae8c8f69 |
line wrap: on
line diff
--- a/Plugins/Visualization/paranormal/pn/pnvis.c Mon Aug 07 23:08:59 2006 -0700 +++ b/Plugins/Visualization/paranormal/pn/pnvis.c Mon Aug 07 23:16:21 2006 -0700 @@ -155,8 +155,8 @@ pn_vis_load_thyself (PnUserObject *user_object, const xmlNodePtr node) { PnVis *vis; - xmlNodePtr actuators_node, actuator_node; - PnActuator *root_actuator; + xmlNodePtr actuators_node, actuator_node, tptr; + PnActuator *root_actuator = NULL; g_return_if_fail (user_object != NULL); g_return_if_fail (PN_IS_VIS (user_object)); @@ -179,9 +179,16 @@ if (! actuator_node) goto done; - /* Create a new actuator */ - root_actuator = pn_actuator_factory_new_actuator_from_xml (actuator_node); - if (! root_actuator) + /* Create a new actuator (reworked by nenolod) */ + for (tptr = actuator_node; tptr != NULL && root_actuator == NULL; tptr = tptr->next) + { + xmlNodePtr ttptr; + + for (ttptr = tptr; ttptr != NULL; ttptr = ttptr->xmlChildrenNode) + root_actuator = pn_actuator_factory_new_actuator_from_xml (ttptr); + } + + if (!root_actuator) pn_error ("Unknown actuator \"%s\"", actuator_node->name); pn_vis_set_root_actuator (vis, root_actuator);