Revision: 74890
          http://sourceforge.net/p/brlcad/code/74890
Author:   starseeker
Date:     2020-02-11 13:46:40 +0000 (Tue, 11 Feb 2020)
Log Message:
-----------
Don't overload debug_mode for color randomization - just add a purpose specific 
option var.

Modified Paths:
--------------
    brlcad/trunk/include/gcv/api.h
    brlcad/trunk/src/conv/3dm/3dm-g.c
    brlcad/trunk/src/libgcv/plugins/rhino/rhino_read.cpp

Modified: brlcad/trunk/include/gcv/api.h
===================================================================
--- brlcad/trunk/include/gcv/api.h      2020-02-11 08:59:47 UTC (rev 74889)
+++ brlcad/trunk/include/gcv/api.h      2020-02-11 13:46:40 UTC (rev 74890)
@@ -116,6 +116,9 @@
 
     /* objects to convert */
     const char * const *object_names;
+
+    /* Apply color randomization */
+    unsigned randomize_colors;
 };
 
 

Modified: brlcad/trunk/src/conv/3dm/3dm-g.c
===================================================================
--- brlcad/trunk/src/conv/3dm/3dm-g.c   2020-02-11 08:59:47 UTC (rev 74889)
+++ brlcad/trunk/src/conv/3dm/3dm-g.c   2020-02-11 13:46:40 UTC (rev 74890)
@@ -75,7 +75,7 @@
                break;
 
            case 'r':
-               gcv_options.debug_mode = 1;
+               gcv_options.randomize_colors = 1;
                break;
 
            case 'v':

Modified: brlcad/trunk/src/libgcv/plugins/rhino/rhino_read.cpp
===================================================================
--- brlcad/trunk/src/libgcv/plugins/rhino/rhino_read.cpp        2020-02-11 
08:59:47 UTC (rev 74889)
+++ brlcad/trunk/src/libgcv/plugins/rhino/rhino_read.cpp        2020-02-11 
13:46:40 UTC (rev 74890)
@@ -726,10 +726,11 @@
        for (BU_PTBL_FOR(entry, (directory **), &found)) {
            comb_to_region(db, (*entry)->d_namep);
 
-           if (gcv_options.debug_mode) {
-               // random colors debug mode: TODO: move this into a filter 
after 7.26.0
+           if (gcv_options.randomize_colors) {
+               // random colors mode: TODO: move this into a filter after 
7.26.0
                std::string rgb;
 
+               // TODO - use bu_color for this...
                for (std::size_t i = 0; i < 3; ++i)
                    rgb.append(lexical_cast<std::string>(static_cast<unsigned>
                                                         (drand48() * 255.0 + 
0.5)) + (i != 2 ? "/" : ""));

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to