so far static mesh import to Unity with BoolPros is good!
polygon disappears when performing boolean > union
@cgbeige, okay, I’ll try to find the time to work on this.
@scr33ner, I think you are quoting something from my obsolete plugin boolop. BoolPro has a property (look at the channel box) for the boolean operation.
Regarding Autodesk, I just wrote a plugin that uses the open source carveLib. I’m not sure how much work the guy who wrote it did, but frankly besides shinny nonsense I don’t expect much from autodesk.
The library supports cmake. cmake is a cross platform makefile generator. You need to install cmake on your os, and then point it to carve dir. You should config cmake to build the library alone without gui, opengl, glut, or boost. After the makefile is generated just use make. Every os might need some small source tweaking such as adding #include <algorithm>.
I think it’s quite straight forward. If you want to give it a try, I’m willing to walk you through this (I don’t have os x).
ok - I’ve used cmake and have it installed so I’ll give it a try later. Which source version are you using? 1.4?
so, with Boost and cmake setup, the make process gives me this error:
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/polyhedron_impl.hpp:92:103: error: 'edges' is a protected member of 'carve::poly::Face<3>'
const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(f->edges[i])];
^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/face_decl.hpp:72:35: note: declared protected here
std::vector<const edge_t *> edges; // pointer into polyhedron.edges
^
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/lib/convex_hull.cpp:22:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/csg.hpp:28:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/poly.hpp:24:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/poly_impl.hpp:25:
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/polyhedron_impl.hpp:93:48: error: 'edges' is a protected member of 'carve::poly::Face<3>'
const face_t *f2 = connectedFace(f, f->edges[i]);
^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/face_decl.hpp:72:35: note: declared protected here
std::vector<const edge_t *> edges; // pointer into polyhedron.edges
^
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/lib/convex_hull.cpp:22:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/csg.hpp:28:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/poly.hpp:24:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/poly_impl.hpp:25:
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/polyhedron_impl.hpp:119:17: error: cannot initialize a variable of type 'face_t *' (aka 'Face<3> *') with an
lvalue of type 'const carve::poly::Face<3> *const'
face_t *f = edge_faces[i];
^ ~
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/polyhedron_impl.hpp:134:17: error: cannot initialize a variable of type 'face_t *' (aka 'Face<3> *') with an
lvalue of type 'const carve::poly::Face<3> *const'
face_t *f = vertex_faces[i];
^ ~
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/polyhedron_impl.hpp:145:36: error: binding of reference to type 'std::vector<const edge_t *>' to a value of type
'const std::vector<const carve::poly::Edge<3> *, std::allocator<const carve::poly::Edge<3> *>>' drops qualifiers
std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)];
^ ~
6 errors generated.
make[2]: *** [lib/CMakeFiles/carve.dir/convex_hull.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/carve.dir/all] Error 2
make: *** [all] Error 2
how do I configure it not to use Boost?
In cmake you have a variable: CARVE_SYSTEM_BOOST. Actually I set all the boolean variables to false, except BUILD_SHARED_LIBRARY (you might even want to try and set it to false as well).
But your errors don’t seem to be boost related (so maybe you should leave it be for now). Let’s try and fix the first ones, and then please post an update errors list. If you can’t seem to find the line I’m talking about, then please let me know, since I’m might be looking on changed files.
1. The compiler seems to be right: The edges variable in class Face is protected. So let's make it public. In file face_decl.hpp move line 72 to line 69 (just cut and paste, don't delete empty lines, so the lines afterward would keep their line numbers).
2. polyhedron_impl.hpp lines 119 and 134 add const in the beginning of each line (f should be a const pointer in both places, since it is assigned to a const pointer).
3. In polyhedron_impl.hpp lines 145-147, the data type seems to be too complex for this compiler to make a reference of. So let's do it without an accessory variable; change these lines from
std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)];
std::copy(e.begin(), e.end(), result);
return e.size();
to
// std::vector<const edge_t *> &e = connectivity.vertex_to_edge[vertexToIndex_fast(v)];
std::copy(connectivity.vertex_to_edge[vertexToIndex_fast(v)].begin(), connectivity.vertex_to_edge[vertexToIndex_fast(v)].end(), result);
return connectivity.vertex_to_edge[vertexToIndex_fast(v)].size();
ok - here’s the latest set of errors with polyhedron_impl.hpp having this as line 119:
const face_t *f = edge_faces[i];
and 134:
const face_t *f = vertex_faces[i];
and I’m still using boost
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/lib/intersect.cpp:23:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/pointset.hpp:22:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/pointset_decl.hpp:27:
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:241:59: error: no type named 'data_t' in 'kd_node<ndim, data_t, inserter_t, aabb_calc_t>'
typedef std::pair<double, const typename kd_node::data_t *> q_t;
~
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:269:33: error: no type named 'data_t' in 'kd_node<ndim, data_t, inserter_t, aabb_calc_t>'
const typename kd_node::data_t *next() {
~
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:23: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:33: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:47: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:58: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:71: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:82: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:273:38: error: member reference base type 'q_t' (aka 'int') is not a structure or union
if (!node->parent || t.first < dist_to_parent_split) {
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:275:26: error: member reference base type 'q_t' (aka 'int') is not a structure or union
return t.second;
~ ^
10 errors generated.
make[2]: *** [lib/CMakeFiles/carve.dir/intersect.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/carve.dir/all] Error 2
make: *** [all] Error 2
Now we stumble upon the most controversial subject between compilers, namely templates. In the lines of the first two error, please delete the keyword typename.
BTW, which compiler do you use, and are there other compilers out there?
I’m using clang, which is the default compiler in OS X 10.8 but I can probably set it to fall back to gcc, if you can tell me how to change that
here are the latest errors:
[ 37%] Building CXX object lib/CMakeFiles/carve.dir/intersect.cpp.o
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/lib/intersect.cpp:23:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/pointset.hpp:22:
In file included from /Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/pointset_decl.hpp:27:
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:241:50: error: no type named 'data_t' in 'kd_node<ndim, data_t, inserter_t, aabb_calc_t>'
typedef std::pair<double, const kd_node::data_t *> q_t;
~^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:269:24: error: no type named 'data_t' in 'kd_node<ndim, data_t, inserter_t, aabb_calc_t>'
const kd_node::data_t *next() {
~^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:23: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:33: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:47: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:58: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:71: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:246:82: error: member reference base type 'const q_t' (aka 'const int') is not a structure or union
return (a.first > b.first) || ((a.first == b.first) && (a.second < b.second));
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:273:38: error: member reference base type 'q_t' (aka 'int') is not a structure or union
if (!node->parent || t.first < dist_to_parent_split) {
~ ^
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/kd_node.hpp:275:26: error: member reference base type 'q_t' (aka 'int') is not a structure or union
return t.second;
~ ^
10 errors generated.
make[2]: *** [lib/CMakeFiles/carve.dir/intersect.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/carve.dir/all] Error 2
make: *** [all] Error 2
The compiler is right, data_t isn’t not a member of the outside class, but a template parameter. Please change in lines 241, 269 the kd_node::data_t to data_t.
If it continues complaining about the same lines, then please change it instead to typename data_t (maybe now, without the kd_node, it would except the typename keyword, although it’s not that necessary to use it here).
I suggest that you try in parallel to compile with gcc as well in a different directory. In order to do so, copy only the original files, or more specifically the whole directory without the directory that cmake created. Actually I think if you specify for cmake a different “where to build the binaries” it should be enough. It would start the configuration from scratch and you could choose from a combo box the compiler you want to work with. But using a different directory for the source files as well would be wise, so the changes that we make to the source files won’t collide between the two compilers.
I think we have a success now. Clean exit only one small warning:
/Volumes/dullard/DOWNLOADS_dull/carve-1.4.0/include/carve/csg_triangulator.hpp:167:7: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
Linking CXX executable triangulate
[ 83%] Built target triangulate
Scanning dependencies of target geom2d_unittest
[ 85%] Building CXX object tests/CMakeFiles/geom2d_unittest.dir/geom2d_unittest.cpp.o
Linking CXX executable geom2d_unittest
[ 85%] Built target geom2d_unittest
Scanning dependencies of target geom3d_unittest
[ 87%] Building CXX object tests/CMakeFiles/geom3d_unittest.dir/geom3d_unittest.cpp.o
Linking CXX executable geom3d_unittest
[ 87%] Built target geom3d_unittest
Scanning dependencies of target test_aabb
[ 88%] Building CXX object tests/CMakeFiles/test_aabb.dir/test_aabb.cpp.o
Linking CXX executable test_aabb
[ 88%] Built target test_aabb
Scanning dependencies of target test_carve_polyhedrons_2
[ 90%] Building CXX object tests/CMakeFiles/test_carve_polyhedrons_2.dir/test_carve_polyhedrons_2.cpp.o
Linking CXX executable test_carve_polyhedrons_2
[ 90%] Built target test_carve_polyhedrons_2
Scanning dependencies of target test_eigen
[ 92%] Building CXX object tests/CMakeFiles/test_eigen.dir/test_eigen.cpp.o
Linking CXX executable test_eigen
[ 92%] Built target test_eigen
Scanning dependencies of target test_geom
[ 94%] Building CXX object tests/CMakeFiles/test_geom.dir/test_geom.cpp.o
Linking CXX executable test_geom
[ 94%] Built target test_geom
Scanning dependencies of target test_rescale
[ 96%] Building CXX object tests/CMakeFiles/test_rescale.dir/test_rescale.cpp.o
Linking CXX executable test_rescale
[ 96%] Built target test_rescale
Scanning dependencies of target test_spacetree
[ 98%] Building CXX object tests/CMakeFiles/test_spacetree.dir/test_spacetree.cpp.o
Linking CXX executable test_spacetree
[ 98%] Built target test_spacetree
Scanning dependencies of target tetrahedron
[100%] Building CXX object tests/CMakeFiles/tetrahedron.dir/tetrahedron.cpp.o
Linking CXX executable tetrahedron
[100%] Built target tetrahedron
so, where do we go from here? Is this ready to send off to my friend who does the plug-in building?
I suppose. Do I remember correctly that you have many OSs with all maya versions, and you can build a plugin to almost any maya version on any platform, or am I confusing you with someone else?
The warning points to something that definitely looks like a bug. Which value is returned for the function if the ‘if’ isn’t satisfied? From the usage of the function I propose the following solution: To the end of line 166 in csg_triangulator.hpp please add (again, not in a new line, so we would preserve the line numbers for the rest of the source code):
else return 0;
or just
return 0;
Hi,
I was able to build carve with xcode on Mac, after changing everything as described. No I’m trying to build the Boolop and BoolPro sources. First thing to mention is, that you have to change the include “conio.h” to “curses.h” in “main.cpp” of Boolop. According to that you also have to add “/usr/lib/libncurses.dylib” to the Library search Paths.
As Im a complete noob with C++ I’m totally stuck right now. To build the sources I added all Maya Headers and Libraries. Additionally I added the Carve includes to the Header search Paths. My Problem is, that I’m getting new errors trying to build Carve in this context. Do I need to include the already build “libcarve.dylib” or something? Or is it required to be able to build carve in the Maya plugin context?
Here are the new Errors with Apple LLVM compiler 4.2:
ld: warning: directory not found for option '-L/Users/dennis/Library/Developer/Xcode/DerivedData/BoolPro-dljwmrbdgcefincmflmmiyzmskxa/Build/Products/Debug'
ld: warning: directory not found for option '-F/Users/dennis/Library/Developer/Xcode/DerivedData/BoolPro-dljwmrbdgcefincmflmmiyzmskxa/Build/Products/Debug'
Undefined symbols for architecture x86_64:
"carve:: csg:: CSG::Hooks::registerHook(carve:: csg:: CSG::Hook*, unsigned int)", referenced from:
carve::interpolate::Interpolator::installHooks(carve:: csg:: CSG&) in BoolPro.bundle-x86_64-master.o
"carve:: csg:: CSG:: compute(carve:: poly:: Polyhedron const*, carve:: poly:: Polyhedron const*, carve:: csg:: CSG::OP, std::unordered_set<std:: pair<carve:: poly::Vertex<3u> const*, carve:: poly::Vertex<3u> const*>, carve:: poly::hash_vertex_ptr, std::equal_to<std:: pair<carve:: poly::Vertex<3u> const*, carve:: poly::Vertex<3u> const*> > >*, carve:: csg:: CSG:: CLASSIFY_TYPE)", referenced from:
boolPro:: compute(MPlug const&, MDataBlock&) in BoolPro.bundle-x86_64-master.o
"carve:: csg:: CSG:: CSG()", referenced from:
boolPro:: compute(MPlug const&, MDataBlock&) in BoolPro.bundle-x86_64-master.o
"carve:: csg:: CSG::~CSG()", referenced from:
boolPro:: compute(MPlug const&, MDataBlock&) in BoolPro.bundle-x86_64-master.o
"carve:: poly:: Polyhedron:: Polyhedron(std::vector<carve:: poly::Face<3u>, std::allocator<carve:: poly::Face<3u> > >&, bool)", referenced from:
mesh2poly_csg(MObject, carve::interpolate::FaceVertexAttr<carve::geom::vector<3u> >&) in BoolPro.bundle-x86_64-master.o
"carve:: poly:: Polyhedron::~Polyhedron()", referenced from:
boolPro:: compute(MPlug const&, MDataBlock&) in BoolPro.bundle-x86_64-master.o
"carve:: poly::Face<3u>::Face(std::vector<carve:: poly::Vertex<3u> const*, std::allocator<carve:: poly::Vertex<3u> const*> > const&, bool)", referenced from:
mesh2poly_csg(MObject, carve::interpolate::FaceVertexAttr<carve::geom::vector<3u> >&) in BoolPro.bundle-x86_64-master.o
"carve::tagable::s_count", referenced from:
carve::tagable::tagable(carve::tagable const&) in BoolPro.bundle-x86_64-master.o
carve::tagable::tagable() in BoolPro.bundle-x86_64-master.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Would be very nice to compile that one for Mac as well!
@cgbeige, he doesn’t really need to build the plugin, but only requires the binary; can you help him there?
@sit10, as I mentioned, your compilation was successful, but the linkage failed, and it missing carve lib symbols. So yes, you need to include libcarve.dylib (add it as an input lib). Also, did you build carve lib and the plugin with the same compiler using the same compiler flags?
@zoharl and @cgbeige After two days of compiler built setting testing, I found out that I only had to remove “OpenMayaMac.h” from the prefix header. I was not able to use the already build “libcarve.dylib” I had to compile the whole carve lib together with the BoolPro source files. I’m pretty sure I just don’t know how to link the .dylib file right. I was now able to build BoolPro for Maya 2012 and 2013 for mac. It’s a real enrichment to Maya. Thank you for that!
Unfortunately I wasn’t able to to build Boolop so far. I used the exact same Environment I was able to build BoolPro, but as far I’m trying to build main.cpp from the boolop sources I get these Errors:
#warning This file includes at least one deprecated or antiquated header. \
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:30:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/csg.hpp:26:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom3d.hpp:21:
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom.hpp:477:12: error: expected member name or ';' after declaration specifiers
bool OK() const { return !D.isZero(); }
^
/opt/local/include/curses.h:317:18: note: expanded from macro 'OK'
#define OK (0)
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:30:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/csg.hpp:26:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom3d.hpp:21:
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom.hpp:477:12: error: expected ')'
bool OK() const { return !D.isZero(); }
^
/opt/local/include/curses.h:317:18: note: expanded from macro 'OK'
#define OK (0)
^
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom.hpp:477:12: note: to match this '('
bool OK() const { return !D.isZero(); }
^
/opt/local/include/curses.h:317:17: note: expanded from macro 'OK'
#define OK (0)
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:30:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/csg.hpp:26:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom3d.hpp:21:
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom.hpp:521:12: error: expected member name or ';' after declaration specifiers
bool OK() const {
^
/opt/local/include/curses.h:317:18: note: expanded from macro 'OK'
#define OK (0)
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:30:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/csg.hpp:26:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom3d.hpp:21:
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom.hpp:521:12: error: expected ')'
bool OK() const {
^
/opt/local/include/curses.h:317:18: note: expanded from macro 'OK'
#define OK (0)
^
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/geom.hpp:521:12: note: to match this '('
bool OK() const {
^
/opt/local/include/curses.h:317:17: note: expanded from macro 'OK'
#define OK (0)
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:30:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/csg.hpp:28:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/poly.hpp:24:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/poly_impl.hpp:25:
/Volumes/Macintosh HD 2/Resources/Maya/plugins/carve-1.4.0/include/carve/polyhedron_impl.hpp:92:44: warning: unused variable 'edge_faces' [-Wunused-variable]
const std::vector<const face_t *> &edge_faces = connectivity.edge_to_face[edgeToIndex_fast(f->edges[i])];
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:32:
/Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/maya_inc.h:5:9: warning: '_BOOL' macro redefined
#define _BOOL
^
<command line>:2:9: note: previous definition is here
#define _BOOL 1
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:32:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/maya_inc.h:27:
In file included from /Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:50:
/Applications/Autodesk/maya2012/devkit/include/maya/MNativeWindowHdl.h:82:3: error: Unsupported platform.
# error Unsupported platform.
^
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/main.cpp:32:
In file included from /Volumes/Macintosh HD 2/Resources/Maya/plugins/Boolop/src/maya_inc.h:27:
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:84:2: error: Unknown OS
#error Unknown OS
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:261:2: error: unknown type name 'MGLContext'
MGLContext display ( MStatus * ReturnStatus = NULL );
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:269:9: error: unknown type name 'MNativeWindowHdl'
static MNativeWindowHdl applicationShell( MStatus * ReturnStatus = NULL );
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:272:2: error: unknown type name 'MNativeWindowHdl'
MNativeWindowHdl window( MStatus * ReturnStatus = NULL );
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:288:34: error: unknown type name 'GLuint'
void beginSelect (GLuint *buffer = NULL, GLsizei size = 0);
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:288:57: error: unknown type name 'GLsizei'
void beginSelect (GLuint *buffer = NULL, GLsizei size = 0);
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:289:5: error: unknown type name 'GLint'
GLint endSelect ();
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:292:34: error: unknown type name 'GLuint'
void loadName (GLuint name);
^
/Applications/Autodesk/maya2012/devkit/include/maya/M3dView.h:293:34: error: unknown type name 'GLuint'
void pushName (GLuint name);
^
3 warnings and 14 errors generated.
What do you need boolop for? It is obsolete, i.e. superseded by boolPro. If you have the boolPro plugin, then use the python setup script to connect the nodes, and you are ready to go.
Also if you have the plugin binaries that other people can use for OSX, please consider sending them to me (zoharl3@yahoo.com), so I would add them to boolPro download page, so other people could take advantage of it.
Yes you are right. I’ll send them to you! I have two questions:
- Is it possible to add an Python shelf button that will create a boolPro Node that has another Bool Type at creation. Because If you have quite complex meshes you have to wait long until you’ll be able to change the Bool Type in the node.
- Thats maybe a dumb question, but how do I add a Mesh with the “Add New Item”? It alwas adds the boolPro node which ich obviously selected to be able to click the “Add new Item” Button :curious:
Thanks for the plugins.
I'll answer both questions. Instead of using the python setup script, setup everything yourself manually. You can do everything through maya GUI (e.g. connection editor), or you can create two shelf buttons, one for creating the boolPro node, and one for adding an object. This tutorial should work for maya's inner boolean command as well.
1. Make sure the plugin is loaded:
if not mel.eval('exists boolPro'):
mc.loadPlugin('boolPro')
or use plugin manager.
2. Create a boolPro node and an output mesh.
res = mc.createNode("mesh")
mc.sets(res, add="initialShadingGroup")
bpro = mc.createNode('boolPro');
mc.connectAttr('%s.outputMesh'%bpro, '%s.inMesh'%res,f=1)
3. Change in the boolPro node the attributes you want, e.g. change the operation from union to intersection.
4. Connect new objects to the boolPro node. For example, to add 'cube1' to 'boolPro1':
First add a new item slot for the new object:
mel.eval('source AEnewNonNumericMulti.mel; AEnewNonNumericMultiAddNewItem("boolPro1","inputMesh");')
or use the 'Add new item' button in the attribute editor of the plugin, and then connect the new object to that slot (slot0 in this case, designated by [0]).
mc.connectAttr('pCube1.worldMesh', 'boolPro1.inputMesh[0]',f=1)
or use the connection editor/hypershade.
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.