Revision: 44653
http://brlcad.svn.sourceforge.net/brlcad/?rev=44653&view=rev
Author: starseeker
Date: 2011-05-23 19:52:44 +0000 (Mon, 23 May 2011)
Log Message:
-----------
OK, .g file with bad attributes was causing problems - revert silly hunt for
region in path.
Modified Paths:
--------------
brlcad/trunk/src/librt/tree.c
Modified: brlcad/trunk/src/librt/tree.c
===================================================================
--- brlcad/trunk/src/librt/tree.c 2011-05-23 13:21:44 UTC (rev 44652)
+++ brlcad/trunk/src/librt/tree.c 2011-05-23 19:52:44 UTC (rev 44653)
@@ -159,8 +159,6 @@
matp_t inv_mat;
struct bu_attribute_value_set avs;
struct bu_attribute_value_pair *avpp;
- int i = 0;
- int region_found = 0;
RT_CK_DBI(tsp->ts_dbip);
RT_CK_FULL_PATH(pathp);
@@ -182,23 +180,12 @@
rp->reg_gmater = tsp->ts_gmater;
rp->reg_los = tsp->ts_los;
- while (pathp->fp_len - i > 0 && !region_found) {
- dp = (struct directory *)DB_FULL_PATH_GET(pathp, i);
- if (dp->d_flags & RT_DIR_REGION) {
- region_found = 1;
- }
- i++;
- }
- if (dp && region_found) {
- printf("full path: %s\n", db_path_to_string(pathp));
- printf("name: %s\n", dp->d_namep);
- bu_avs_init_empty(&avs);
- if (!db5_get_attributes(tsp->ts_dbip, &avs, dp)) {
- bu_avs_print(&avs, "db5_get_attribute results:");
- bu_avs_init_empty(&(rp->attr_values));
- for(BU_AVS_FOR(avpp, &(tsp->ts_attrs))) {
- bu_avs_add(&(rp->attr_values), avpp->name, bu_avs_get(&avs,
avpp->name));
- }
+ dp = (struct directory *)DB_FULL_PATH_CUR_DIR(pathp);
+ bu_avs_init_empty(&avs);
+ if (!db5_get_attributes(tsp->ts_dbip, &avs, dp)) {
+ bu_avs_init_empty(&(rp->attr_values));
+ for(BU_AVS_FOR(avpp, &(tsp->ts_attrs))) {
+ bu_avs_add(&(rp->attr_values), avpp->name, bu_avs_get(&avs,
avpp->name));
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits