mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-15 18:14:08 +00:00
Work on 3ds max plug-in
This commit is contained in:
@@ -16,25 +16,32 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
################################################################################
|
||||
foreach(max_year RANGE 2014 2030)
|
||||
|
||||
set(max_sdk "$ENV{ADSK_3DSMAX_SDK_${max_year}}")
|
||||
if (NOT "${max_sdk}" STREQUAL "")
|
||||
|
||||
INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${OCC_INCLUDE_DIR} ${OPENCOLLADA_INCLUDE_DIRS} ${ICU_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS} ${THREEDS_MAX_SDK_HOME}/include
|
||||
${Boost_INCLUDE_DIRS} ${max_sdk}/include
|
||||
)
|
||||
|
||||
# All recent versions of 3ds Max (2014 and newer) are 64-bit only so assume lib/x64 directory
|
||||
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${IfcOpenShell_BINARY_DIR} ${OCC_LIBRARY_DIR} ${OPENCOLLADA_LIBRARY_DIR}
|
||||
${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS} ${THREEDS_MAX_SDK_HOME}/lib/x64/Release
|
||||
${ICU_LIBRARY_DIR} ${Boost_LIBRARY_DIRS} ${max_sdk}/lib/x64/Release
|
||||
)
|
||||
|
||||
ADD_LIBRARY(IfcMax SHARED IfcMax.h IfcMax.cpp)
|
||||
ADD_LIBRARY(IfcMax_${max_year} SHARED IfcMax.h IfcMax.cpp)
|
||||
|
||||
# TODO: find the minimal subset of 3dsmax libraries to reference
|
||||
TARGET_LINK_LIBRARIES(IfcMax ${IFCOPENSHELL_LIBRARIES} Comctl32.lib zlibdll.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib
|
||||
TARGET_LINK_LIBRARIES(IfcMax_${max_year} ${IFCOPENSHELL_LIBRARIES} Comctl32.lib zlibdll.lib bmm.lib core.lib CustDlg.lib edmodel.lib expr.lib
|
||||
flt.lib geom.lib gfx.lib gup.lib imageViewers.lib ManipSys.lib maxnet.lib Maxscrpt.lib
|
||||
maxutil.lib MenuMan.lib menus.lib mesh.lib MNMath.lib Paramblk2.lib particle.lib Poly.lib RenderUtil.lib
|
||||
tessint.lib viewfile.lib ${OPENCASCADE_LIBRARIES}
|
||||
)
|
||||
|
||||
SET_TARGET_PROPERTIES(IfcMax PROPERTIES SUFFIX ".dli")
|
||||
SET_TARGET_PROPERTIES(IfcMax_${max_year} PROPERTIES SUFFIX ".dli")
|
||||
|
||||
INSTALL(TARGETS IfcMax RUNTIME DESTINATION ${BINDIR})
|
||||
INSTALL(TARGETS IfcMax_${max_year} RUNTIME DESTINATION ${BINDIR})
|
||||
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -24,7 +24,10 @@
|
||||
#include <istdplug.h>
|
||||
|
||||
#include "IfcMax.h"
|
||||
#include "../ifcgeom/IfcGeomIterator.h"
|
||||
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomMaterial.h"
|
||||
#include "../ifcgeom/IfcGeomElement.h"
|
||||
|
||||
static const int NUM_MATERIAL_SLOTS = 24;
|
||||
|
||||
@@ -226,7 +229,8 @@ int IFCImp::DoImport(const TCHAR *name, ImpInterface *impitfc, Interface *itfc,
|
||||
const char* fn_mb = name;
|
||||
#endif
|
||||
|
||||
IfcGeom::Iterator<float> iterator(settings, fn_mb);
|
||||
IfcParse::IfcFile file(fn_mb);
|
||||
IfcGeom::Iterator<float> iterator(settings, &file);
|
||||
delete fn_mb;
|
||||
if (!iterator.initialize()) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user