From cb3716ffb584fe0f593b6f1669a8efdba1305104 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Tue, 29 Mar 2016 02:16:55 +1000 Subject: Added my version of libg3d and friends. --- .../libg3d-0.0.8/plugins/import/imp_maya/Makefile | 518 +++++++++++++++++ .../plugins/import/imp_maya/Makefile.am | 25 + .../plugins/import/imp_maya/Makefile.in | 518 +++++++++++++++++ .../plugins/import/imp_maya/imp_maya.c | 77 +++ .../plugins/import/imp_maya/imp_maya_callbacks.c | 645 +++++++++++++++++++++ .../plugins/import/imp_maya/imp_maya_callbacks.h | 43 ++ .../plugins/import/imp_maya/imp_maya_chunks.h | 130 +++++ .../plugins/import/imp_maya/imp_maya_obj.c | 110 ++++ .../plugins/import/imp_maya/imp_maya_obj.h | 41 ++ .../plugins/import/imp_maya/imp_maya_var.c | 60 ++ .../plugins/import/imp_maya/imp_maya_var.h | 33 ++ 11 files changed, 2200 insertions(+) create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.am create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.in create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_chunks.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.h create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.c create mode 100644 src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.h (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya') diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile new file mode 100644 index 0000000..ac3c0b3 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile @@ -0,0 +1,518 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# plugins/import/imp_maya/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + + +pkgdatadir = $(datadir)/libg3d +pkglibdir = $(libdir)/libg3d +pkgincludedir = $(includedir)/libg3d +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-unknown-linux-gnu +host_triplet = x86_64-unknown-linux-gnu +subdir = plugins/import/imp_maya +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/g3d/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pluginimpdir)" +pluginimpLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pluginimp_LTLIBRARIES) +imp_maya_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_maya_la_OBJECTS = imp_maya.lo imp_maya_callbacks.lo \ + imp_maya_obj.lo imp_maya_var.lo +imp_maya_la_OBJECTS = $(am_imp_maya_la_OBJECTS) +#am_imp_maya_la_rpath = -rpath $(pluginimpdir) +DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imp_maya_la_SOURCES) +DIST_SOURCES = $(imp_maya_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 +AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar +AR = ar +AS = as +AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf +AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader +AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DBG_CFLAGS = -O2 +DEBUG = 0 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = dlltool +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +GDKPIXBUF_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 +GDKPIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 +GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include +GLIB_GENMARSHAL = glib-genmarshal +GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 +GLIB_MKENUMS = glib-mkenums +GOBJECT_QUERY = gobject-query +GREP = /bin/grep +GTKDOC_CHECK = /usr/bin/gtkdoc-check +GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 +GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 +HTML_DIR = ${datadir}/gtk-doc/html +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +LDFLAGS = +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.yy +LIBGSF_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libgsf-1 +LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 +LIBOBJS = +LIBS = -lm +LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet +LIBXML2_CFLAGS = -I/usr/include/libxml2 +LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 +LN_S = ln -s +LTLIBOBJS = +LTVERSION = 0:8:0 +MAGIC_LIBS = -lmagic +MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo +MATH_LIBS = -lm +MKDIR_P = /bin/mkdir -p +OBJDUMP = objdump +OBJEXT = o +PACKAGE = libg3d +PACKAGE_BUGREPORT = +PACKAGE_NAME = +PACKAGE_STRING = +PACKAGE_TARNAME = +PACKAGE_VERSION = +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PLUGINS_LDFLAGS = -avoid-version -export-dynamic +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/bash +STRIP = strip +VERSION = 0.0.8 +XML2_CONFIG = /usr/bin/xml2-config +XML_CPPFLAGS = -I/usr/include/libxml2 +XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 +Z_CFLAGS = +Z_LIBS = -lz +abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya +abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya +abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 +abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = x86_64-unknown-linux-gnu +build_alias = +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-unknown-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +pdfdir = ${docdir} +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_builddir = ../../.. +top_srcdir = ../../.. +pluginimpdir = $(pkglibdir)/plugins/import +#pluginimp_LTLIBRARIES = imp_maya.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + -O2 -DDEBUG=0 \ + -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include + +INCLUDES = -I$(top_srcdir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + -avoid-version -export-dynamic + +imp_maya_la_SOURCES = imp_maya.c imp_maya_chunks.h \ + imp_maya_callbacks.c imp_maya_callbacks.h \ + imp_maya_obj.c imp_maya_obj.h \ + imp_maya_var.c imp_maya_var.h + +imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pluginimpLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ + done + +clean-pluginimpLTLIBRARIES: + -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imp_maya.la: $(imp_maya_la_OBJECTS) $(imp_maya_la_DEPENDENCIES) + $(LINK) $(am_imp_maya_la_rpath) $(imp_maya_la_OBJECTS) $(imp_maya_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/imp_maya.Plo +include ./$(DEPDIR)/imp_maya_callbacks.Plo +include ./$(DEPDIR)/imp_maya_obj.Plo +include ./$(DEPDIR)/imp_maya_var.Plo + +.c.o: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< + mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pluginimpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pluginimpLTLIBRARIES + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pluginimpLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.am new file mode 100644 index 0000000..5ca42bd --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.am @@ -0,0 +1,25 @@ +pluginimpdir = $(pkglibdir)/plugins/import + +if EXPERIMENTAL +pluginimp_LTLIBRARIES = imp_maya.la +endif + +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include + +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +LIBTOOL += --quiet + +imp_maya_la_SOURCES = imp_maya.c imp_maya_chunks.h \ + imp_maya_callbacks.c imp_maya_callbacks.h \ + imp_maya_obj.c imp_maya_obj.h \ + imp_maya_var.c imp_maya_var.h +imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.in new file mode 100644 index 0000000..306a6c9 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.in @@ -0,0 +1,518 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = plugins/import/imp_maya +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/g3d/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pluginimpdir)" +pluginimpLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pluginimp_LTLIBRARIES) +imp_maya_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la +am_imp_maya_la_OBJECTS = imp_maya.lo imp_maya_callbacks.lo \ + imp_maya_obj.lo imp_maya_var.lo +imp_maya_la_OBJECTS = $(am_imp_maya_la_OBJECTS) +@EXPERIMENTAL_TRUE@am_imp_maya_la_rpath = -rpath $(pluginimpdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(imp_maya_la_SOURCES) +DIST_SOURCES = $(imp_maya_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBG_CFLAGS = @DBG_CFLAGS@ +DEBUG = @DEBUG@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ +GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GOBJECT_QUERY = @GOBJECT_QUERY@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ +LIBGSF_LIBS = @LIBGSF_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ --quiet +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LTVERSION = @LTVERSION@ +MAGIC_LIBS = @MAGIC_LIBS@ +MAKEINFO = @MAKEINFO@ +MATH_LIBS = @MATH_LIBS@ +MKDIR_P = @MKDIR_P@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ +RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +XML2_CONFIG = @XML2_CONFIG@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +Z_CFLAGS = @Z_CFLAGS@ +Z_LIBS = @Z_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +pluginimpdir = $(pkglibdir)/plugins/import +@EXPERIMENTAL_TRUE@pluginimp_LTLIBRARIES = imp_maya.la +AM_CFLAGS = \ + -Wall -ansi -pedantic \ + -DG_LOG_DOMAIN=\"LibG3D\" \ + @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ + @GLIB_CFLAGS@ + +INCLUDES = -I$(top_srcdir)/include +AM_LDFLAGS = \ + -no-undefined -module \ + @PLUGINS_LDFLAGS@ + +imp_maya_la_SOURCES = imp_maya.c imp_maya_chunks.h \ + imp_maya_callbacks.c imp_maya_callbacks.h \ + imp_maya_obj.c imp_maya_obj.h \ + imp_maya_var.c imp_maya_var.h + +imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pluginimpLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ + done + +clean-pluginimpLTLIBRARIES: + -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) + @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +imp_maya.la: $(imp_maya_la_OBJECTS) $(imp_maya_la_DEPENDENCIES) + $(LINK) $(am_imp_maya_la_rpath) $(imp_maya_la_OBJECTS) $(imp_maya_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya_callbacks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya_obj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya_var.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pluginimpdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pluginimpLTLIBRARIES + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pluginimpLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya.c new file mode 100644 index 0000000..d07bfb2 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya.c @@ -0,0 +1,77 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include +#include + +#include + +#include +#include + +#include "imp_maya_chunks.h" + +EAPI +gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, + G3DModel *model, gpointer user_data) +{ + G3DIffGlobal *global; + G3DIffLocal *local; + guint32 id; + gsize len; + + if(!g3d_iff_check(stream, &id, &len) || + (id != G3D_IFF_MKID('M','a','y','a'))) { + g_warning("file is not an Maya file %s", stream->uri); + return FALSE; + } + + local = g_new0(G3DIffLocal, 1); + global = g_new0(G3DIffGlobal, 1); + + global->context = context; + global->model = model; + global->stream = stream; + + local->parent_id = id; + local->nb = len; + + g3d_iff_read_ctnr(global, local, maya_chunks, G3D_IFF_PAD4); + + g_free(local); + g_free(global); + + return TRUE; +} + +EAPI +gchar *plugin_description(void) +{ + return g_strdup("Maya models."); +} + +EAPI +gchar **plugin_extensions(void) +{ + return g_strsplit("mb", ":", 0); +} + diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.c new file mode 100644 index 0000000..f2b4907 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.c @@ -0,0 +1,645 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "imp_maya_obj.h" +#include "imp_maya_var.h" + +/* compound? */ +gboolean maya_cb_CMPD(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 flags, i; + gdouble *val; + gchar *var; + gchar *padding = " "; + + if(local->nb < 26) + { + g_warning("[Maya][CMPD] size: %d", local->nb); + return FALSE; + } + + /* var */ + var = g_new0(gchar, local->nb - 25); + g3d_stream_read(global->stream, var, local->nb - 25); + local->nb -= (local->nb - 25); + + /* flags ? */ + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + val = g_new0(gdouble, 3); + + for(i = 0; i < 3; i ++) + { + val[i] = g3d_stream_read_double_be(global->stream); + local->nb -= 8; + } + + g_debug("\\%s[Maya][CMPD] %s = [%g %g %g]", + padding + (strlen(padding) - local->level), + var, + val[0], val[1], val[2]); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, val); + else + g_free(val); + + g_free(var); + + return TRUE; +} + +/* creator */ +gboolean maya_cb_CREA(G3DIffGlobal *global, G3DIffLocal *local) +{ + MayaObject *obj; + gint32 max_len, flags; + gchar *buffer, *name; + gchar *padding = " "; + + /* flags ? */ + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + max_len = local->nb; + buffer = g_malloc(max_len + 1); + + /* object name */ + local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len); + name = g_strdup(buffer); + + obj = (MayaObject *)local->object; + if(obj) + obj->name = g_strdup(buffer); + + /* parent name */ + if(local->nb > 0) + local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len); + else + *buffer = '\0'; + + if(obj && *buffer) + obj->parent = g_strdup(buffer); + + g_debug("\\%s[Maya][CREA] %s (%s)", + padding + (strlen(padding) - local->level), + name, *buffer ? buffer : "none"); + + g_free(buffer); + g_free(name); + + return TRUE; +} + +gboolean maya_cb_CWFL(G3DIffGlobal *global, G3DIffLocal *local) +{ + gchar *buffer, *name; + gchar *padding = " "; + guint32 flags, max_len; + + /* flags ? */ + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + max_len = local->nb; + buffer = g_malloc(max_len + 1); + + local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len); + name = g_strdup(buffer); + + local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len); + + g_debug("\\%s[Maya][CWFL] %s; %s (flags: %u, %d bytes left)", + padding + (strlen(padding) - local->level), + name, buffer, flags, local->nb); + + g_free(name); + g_free(buffer); + + return TRUE; +} + +/* double # */ +gboolean maya_cb_DBLn(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 len, flags, ndbl, i; + gdouble *val; + gchar *var; + gchar *padding = " "; + + len = local->nb - 9; + var = g_malloc(len); + g3d_stream_read(global->stream, var, len); + local->nb -= len; + + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + ndbl = local->nb / 8; + val = g_new0(gdouble, ndbl); + for(i = 0; i < ndbl; i ++) + { + val[i] = g3d_stream_read_double_be(global->stream); + local->nb -= 8; + } + + g_debug("\\%s[Maya][DBL#] %s (%d doubles) (0x%02X)", + padding + (strlen(padding) - local->level), + var, ndbl, flags); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, val); + else + g_free(val); + + g_free(var); + + return TRUE; +} + +/* double 2 */ +gboolean maya_cb_DBL2(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 len, flags; + gdouble *val; + gchar *var; + gchar *padding = " "; + + len = local->nb - 17; + var = g_malloc(len); + g3d_stream_read(global->stream, var, len); + local->nb -= len; + + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + val = g_new0(gdouble, 2); + val[0] = g3d_stream_read_double_be(global->stream); + val[1] = g3d_stream_read_double_be(global->stream); + local->nb -= 16; + + g_debug("\\%s[Maya][DBL2] %s = (%g,%g) (0x%02X)", + padding + (strlen(padding) - local->level), + var, val[0], val[1], flags); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, val); + else + g_free(val); + + g_free(var); + + return TRUE; +} + +/* double 3 */ +gboolean maya_cb_DBL3(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 len, flags; + gdouble *val; + gchar *var; + gchar *padding = " "; + + len = local->nb - 25; + var = g_malloc(len); + g3d_stream_read(global->stream, var, len); + local->nb -= len; + + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + val = g_new0(gdouble, 3); + val[0] = g3d_stream_read_double_be(global->stream); + val[1] = g3d_stream_read_double_be(global->stream); + val[2] = g3d_stream_read_double_be(global->stream); + local->nb -= 24; + + g_debug("\\%s[Maya][DBL3] %s = (%g,%g,%g) (0x%02X)", + padding + (strlen(padding) - local->level), + var, val[0], val[1], val[2], flags); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, val); + else + g_free(val); + + g_free(var); + + return TRUE; +} + +/* double */ +gboolean maya_cb_DBLE(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 len, flags; + gdouble val; + gchar *var; + gchar *padding = " "; + + len = local->nb - 9; + if(len <= 0) + { + g_warning("[Maya][DBLE] length of chunk: %d", local->nb); + return FALSE; + } + + var = g_malloc(len); + g3d_stream_read(global->stream, var, len); + local->nb -= len; + + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + val = g3d_stream_read_double_be(global->stream); + local->nb -= 8; + + g_debug("\\%s[Maya][DBLE] %s = %g (0x%02X)", + padding + (strlen(padding) - local->level), + var, val, flags); + + if(local->object) + maya_var_set_double((MayaObject *)local->object, var, val); + + g_free(var); + + return TRUE; +} + +/* mesh object */ +gboolean maya_cb_DMSH(G3DIffGlobal *global, G3DIffLocal *local) +{ + MayaObject *obj; + G3DObject *object, *parent; + G3DMaterial *material; + + if(local->finalize) + { + obj = (MayaObject *)local->object; + + object = (G3DObject *)obj->user_data; + object->name = obj->name ? g_strdup(obj->name) : "(unnamed mesh)"; + + if(obj->parent) + { + parent = g3d_model_get_object_by_name(global->model, obj->parent); + if(parent) + object->transformation = parent->transformation; + } + + maya_obj_add_to_tree(obj, global->model, object); + maya_obj_free(obj); + } + else + { + obj = maya_obj_new(); + local->object = obj; + + material = g3d_material_new(); + material->name = g_strdup("(default material)"); + + object = g_new0(G3DObject, 1); + object->materials = g_slist_append(object->materials, material); + + obj->user_data = object; + } + + return TRUE; +} + +/* float 3 */ +gboolean maya_cb_FLT3(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 len, flags; + G3DFloat *val; + gchar *var; + gchar *padding = " "; + + len = local->nb - 13; + var = g_malloc(len); + g3d_stream_read(global->stream, var, len); + local->nb -= len; + + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + val = g_new0(G3DFloat, 3); + val[0] = g3d_stream_read_float_be(global->stream); + val[1] = g3d_stream_read_float_be(global->stream); + val[2] = g3d_stream_read_float_be(global->stream); + local->nb -= 12; + + g_debug("\\%s[Maya][DBL3] %s = (%g; %g; %g) (0x%02X)", + padding + (strlen(padding) - local->level), + var, val[0], val[1], val[2], flags); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, val); + else + g_free(val); + + g_free(var); + + return TRUE; +} + +/* matrix */ +gboolean maya_cb_MATR(G3DIffGlobal *global, G3DIffLocal *local) +{ + gint32 flags, i; + G3DFloat *val; + gchar *var; + gchar *padding = " "; + + if(local->nb <= 129) + { + g_warning("[Maya][MATR] matrix size: %d", local->nb); + return FALSE; + } + + /* var */ + var = g_new0(gchar, local->nb - 129); + g3d_stream_read(global->stream, var, local->nb - 129); + local->nb -= (local->nb - 129); + + /* flags ? */ + flags = g3d_stream_read_int8(global->stream); + local->nb -= 1; + + val = g_new0(G3DFloat, 16); + + for(i = 0; i < 16; i ++) + { + val[i] = (G3DFloat)g3d_stream_read_double_be(global->stream); + local->nb -= 8; + } + + g_debug("\\%s[Maya][MATR] %s = \n" + "%f %f %f %f\n" + "%f %f %f %f\n" + "%f %f %f %f\n" + "%f %f %f %f", + padding + (strlen(padding) - local->level), + var, + val[0 * 4 + 0], val[1 * 4 + 0], val[2 * 4 + 0], val[3 * 4 + 0], + val[0 * 4 + 1], val[1 * 4 + 1], val[2 * 4 + 1], val[3 * 4 + 1], + val[0 * 4 + 2], val[1 * 4 + 2], val[2 * 4 + 2], val[3 * 4 + 2], + val[0 * 4 + 3], val[1 * 4 + 3], val[2 * 4 + 3], val[3 * 4 + 3]); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, val); + else + g_free(val); + + g_free(var); + + return TRUE; +} + +/* mesh */ +gboolean maya_cb_MESH(G3DIffGlobal *global, G3DIffLocal *local) +{ + G3DObject *object; + G3DMaterial *material; + G3DFace *face; + gint32 x1, x2, x3, x4, i, i1, i2; + + x1 = g3d_stream_read_int16_be(global->stream); + x2 = g3d_stream_read_int16_be(global->stream); + x3 = g3d_stream_read_int16_be(global->stream); + x4 = g3d_stream_read_int16_be(global->stream); + local->nb -= 8; + + object = (G3DObject *)((MayaObject *)local->object)->user_data; + material = (G3DMaterial *)g_slist_nth_data(object->materials, 0); + + if(x1 == 0x6369) + { + object->vertex_count = x4 / 3; + object->vertex_data = g_new0(G3DFloat, object->vertex_count * 3); + + for(i = 0; i < object->vertex_count; i ++) + { + object->vertex_data[i * 3 + 0] = g3d_stream_read_float_be(global->stream); + object->vertex_data[i * 3 + 1] = g3d_stream_read_float_be(global->stream); + object->vertex_data[i * 3 + 2] = g3d_stream_read_float_be(global->stream); + local->nb -= 12; + } + + x3 = g3d_stream_read_int16_be(global->stream); + x4 = g3d_stream_read_int16_be(global->stream); + local->nb -= 4; +#if 0 + g_debug("[Maya][MESH] %d %d", x3, x4); +#endif + i1 = -1; + i2 = -1; + for(i = 0; i < x4 / 2; i ++) + { + if(i1 == -1) + { + i1 = g3d_stream_read_int32_be(global->stream) & 0xFFFFFF; + i2 = g3d_stream_read_int32_be(global->stream) & 0xFFFFFF; + local->nb -= 8; + } + else + { + face = g_new0(G3DFace, 1); + face->vertex_count = 4; + face->vertex_indices = g_new0(guint32, 4); + face->vertex_indices[0] = i1; + face->vertex_indices[1] = i2; + face->vertex_indices[2] = + g3d_stream_read_int32_be(global->stream) & 0xFFFFFF; + face->vertex_indices[3] = + g3d_stream_read_int32_be(global->stream) & 0xFFFFFF; + face->material = material; + local->nb -= 8; + i1 = face->vertex_indices[3]; + i2 = face->vertex_indices[2]; + + object->faces = g_slist_append(object->faces, face); + } + } + + x3 = g3d_stream_read_int16_be(global->stream); + x4 = g3d_stream_read_int16_be(global->stream); + local->nb -= 4; + } + return TRUE; +} + +/* poly cube */ +gboolean maya_cb_PCUB(G3DIffGlobal *global, G3DIffLocal *local) +{ + MayaObject *obj; + G3DObject *object; + G3DMaterial *material; + gdouble w, h, d; + + if(local->finalize) + { + obj = (MayaObject *)local->object; + g_return_val_if_fail(obj != NULL, FALSE); + + w = maya_var_get_double(obj, "w", 1.0); + h = maya_var_get_double(obj, "h", 1.0); + d = maya_var_get_double(obj, "d", 1.0); + + material = g3d_material_new(); + object = g3d_primitive_box(w, h, d, material); + object->name = obj->name ? g_strdup(obj->name) : + g_strdup("(unnamed cube)"); + + object->materials = g_slist_append(object->materials, material); + maya_obj_add_to_tree(obj, global->model, object); + + /* destroy object */ + maya_obj_free(obj); + } + else + { + /* create object */ + obj = maya_obj_new(); + local->object = obj; + } + + return TRUE; +} + +/* cylinder */ +gboolean maya_cb_PCYL(G3DIffGlobal *global, G3DIffLocal *local) +{ + MayaObject *obj; + G3DObject *object; + G3DMaterial *material; + gdouble h, r; + guint32 s; + + if(local->finalize) { + obj = (MayaObject *)local->object; + g_return_val_if_fail(obj != NULL, FALSE); + + h = maya_var_get_double(obj, "h", 1.0); + r = maya_var_get_double(obj, "r", 0.5); + s = MAX(3, (guint32)maya_var_get_double(obj, "sx", 20)); + + material = g3d_material_new(); + object = g3d_primitive_cylinder(r, h, s, TRUE, TRUE, material); + if(object) { + object->name = obj->name ? g_strdup(obj->name) : + g_strdup("(unnamed cylinder)"); + + object->materials = g_slist_append(object->materials, material); + maya_obj_add_to_tree(obj, global->model, object); + } + /* destroy object */ + maya_obj_free(obj); + } else { + /* create object */ + obj = maya_obj_new(); + local->object = obj; + } + return TRUE; +} + +/* string */ +gboolean maya_cb_STR_(G3DIffGlobal *global, G3DIffLocal *local) +{ + gchar *buffer, *var; + gchar *padding = " "; + + /* variable */ + buffer = g_malloc(local->nb); + local->nb -= g3d_stream_read_cstr(global->stream, buffer, local->nb); + var = g_strdup(buffer); + + /* value */ + local->nb -= g3d_stream_read_cstr(global->stream, buffer, local->nb); + + g_debug("\\%s[Maya][STR ] %s = '%.*s' (%d characters)", + padding + (strlen(padding) - local->level), + var, 40, buffer, (int) strlen(buffer)); + + if(local->object) + maya_var_set((MayaObject *)local->object, var, g_strdup(buffer)); + + g_free(buffer); + g_free(var); + + return TRUE; +} + +/* transformation */ +gboolean maya_cb_XFRM(G3DIffGlobal *global, G3DIffLocal *local) +{ + MayaObject *obj; + G3DObject *object; + G3DTransformation *tf; + gdouble *val; + + if(local->finalize) + { + obj = (MayaObject *)local->object; + + object = maya_obj_to_g3d(obj); + + tf = g_new0(G3DTransformation, 1); + g3d_matrix_identity(tf->matrix); + + val = maya_var_get(obj, "t"); + if(val) + g3d_matrix_translate(val[0], val[1], val[2], tf->matrix); + + val = maya_var_get(obj, "r"); + if(val) + g3d_matrix_rotate_xyz(val[0], val[1], val[2], tf->matrix); + + val = maya_var_get(obj, "s"); + if(val) + g3d_matrix_scale(val[0], val[1], val[2], tf->matrix); + + /* g3d_matrix_dump(tf->matrix); */ + + object->transformation = tf; + + maya_obj_add_to_tree(obj, global->model, object); + + maya_obj_free(obj); + } + else + { + obj = maya_obj_new(); + local->object = obj; + } + + return TRUE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.h new file mode 100644 index 0000000..aaa0718 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.h @@ -0,0 +1,43 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_MAYA_CALLBACKS_H +#define _IMP_MAYA_CALLBACKS_H + +#include + +gboolean maya_cb_CMPD(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_CREA(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_CWFL(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_DBLn(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_DBL2(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_DBL3(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_DBLE(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_DMSH(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_FLT3(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_MATR(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_MESH(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_PCUB(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_PCYL(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_STR_(G3DIffGlobal *global, G3DIffLocal *local); +gboolean maya_cb_XFRM(G3DIffGlobal *global, G3DIffLocal *local); + +#endif /* _IMP_MAYA_CALLBACKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_chunks.h new file mode 100644 index 0000000..84997a9 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_chunks.h @@ -0,0 +1,130 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_MAYA_CHUNKS_H +#define _IMP_MAYA_CHUNKS_H + +#include + +#include "imp_maya_callbacks.h" + +static G3DIffChunkInfo maya_chunks[] = { + { "ATTR", "unknown", 0, NULL }, + { "AUDI", "audio", 1, NULL }, /* FOR4 */ + { "AUNI", "angle unit", 0, NULL }, + { "BRSH", "brush", 1, NULL }, /* FOR4 */ + { "CHNG", "changes", 0, NULL }, + { "CMP#", "unknown", 0, NULL }, + { "CMPD", "compound", 0, maya_cb_CMPD }, + { "CONN", "connection list", 1, NULL }, /* FOR4 */ + { "CONS", "construction", 1, NULL }, /* LIS4 */ + { "CWFL", "connect attr", 0, maya_cb_CWFL }, + { "CREA", "create node", 0, maya_cb_CREA }, + { "DBL#", "double #", 0, maya_cb_DBLn }, + { "DBL2", "double 2", 0, maya_cb_DBL2 }, + { "DBL3", "double 3", 0, maya_cb_DBL3 }, + { "DBLE", "double", 0, maya_cb_DBLE }, + { "DCAM", "camera", 1, NULL }, /* FOR4 */ + { "DECT", "delete component", 1, NULL }, /* FOR4 */ + { "DELA", "delete attribute", 1, NULL }, /* FOR4 */ + { "DELL", "delete list", 1, NULL }, /* LIS4 */ + { "DISC", "unknown", 0, NULL }, + { "DISL", "unknown", 1, NULL }, /* LIS4 */ + { "DMSH", "mesh", 1, maya_cb_DMSH }, + { "DMTI", "material info", 1, NULL }, /* FOR4 */ + { "DPLM", "layer manager", 1, NULL }, /* FOR4 */ + { "DSPL", "layer ?", 1, NULL }, /* FOR4 */ + { "FINF", "file information", 0, maya_cb_STR_ }, + { "FDFL", "flare ?", 1, NULL }, /* FOR4 */ + { "FLGS", "flags", 0, NULL }, + { "FLT2", "float 2", 0, NULL }, + { "FLT3", "float 3", 0, maya_cb_FLT3 }, + { "FMPT", "unknown", 1, NULL }, /* FOR4 */ + { "FNLD", "unknown", 1, NULL }, /* FOR4 */ + { "GPID", "group id", 1, NULL }, /* FOR4 */ + { "GRPP", "group parts", 1, NULL }, /* FOR4 */ + { "HEAD", "header", 1, NULL }, /* FOR4 */ + { "ICON", "icon", 0, NULL }, + { "INCL", "includes", 0, NULL }, + { "INFO", "information", 0, NULL }, + { "LUNI", "length unit", 0, NULL }, + { "MADE", "creation date", 0, NULL }, + { "MATR", "matrix", 0, maya_cb_MATR }, + { "MESH", "mesh", 0, maya_cb_MESH }, + { "NPLN", "unknown", 0, NULL }, + { "NRBS", "NURBS ?", 0, NULL }, + { "NSRF", "surface", 1, NULL }, /* FOR4 */ + { "OBJN", "unknown", 0, NULL }, + { "OBST", "unknown", 1, NULL }, /* FOR4 */ + { "PAUP", "poly auto proj", 1, NULL }, /* FOR4 */ + { "PBOP", "poly boolean operation", 1, NULL }, /* FOR4 */ + { "PBVL", "poly bevel", 1, NULL }, /* FOR4 */ + { "PCRE", "poly create face", 1, NULL }, /* FOR4 */ + { "PCTA", "poly rotate ?", 1, NULL }, /* FOR4 */ + { "PCTL", "poly translate ?", 1, NULL }, /* FOR4 */ + { "PCTU", "poly scale ?", 1, NULL }, /* FOR4 */ + { "PCUB", "poly cube", 1, maya_cb_PCUB }, + { "PCYL", "poly cylinder", 1, maya_cb_PCYL }, + { "PEXE", "poly extrude", 1, NULL }, /* FOR4 */ + { "PEXF", "poly extrude face", 1, NULL }, /* FOR4 */ + { "PFUV", "poly flip UV", 1, NULL }, /* FOR4 */ + { "PING", "unknown", 1, NULL }, /* FOR4 */ + { "PLUG", "plugin ?", 0, NULL }, + { "PMIR", "poly mirror", 1, NULL }, /* FOR4 */ + { "PMVE", "poly merge vertices", 1, NULL }, /* FOR4 */ + { "PPCT", "poly cut", 1, NULL }, /* FOR4 */ + { "PPIP", "poly pipe", 1, NULL }, /* FOR4 */ + { "PRNS", "unknown", 0, NULL }, + { "PRNT", "unknown", 0, NULL }, + { "PSEP", "poly separate", 1, NULL }, /* FOR4 */ + { "PSMF", "poly smooth face", 1, NULL }, /* FOR4 */ + { "PSOE", "poly soft edge", 1, NULL }, /* FOR4 */ + { "PSPH", "poly sphere", 1, NULL }, /* FOR4 */ + { "PSPL", "poly split", 1, NULL }, /* FOR4 */ + { "PTRI", "poly triangulate", 1, NULL }, /* FOR4 */ + { "PTUV", "poly tweak UV", 1, NULL }, /* FOR4 */ + { "PTWK", "poly tweak", 1, NULL }, /* FOR4 */ + { "PUNI", "poly unite", 1, NULL }, /* FOR4 */ + { "RANI", "anisotropic", 1, NULL }, /* FOR4 */ + { "RBLN", "unknown", 1, NULL }, /* FOR4 */ + { "RLAM", "lambert", 1, NULL }, /* FOR4 */ + { "RLLK", "light linker", 1, NULL }, /* FOR4 */ + { "RNDL", "render layer", 1, NULL }, /* FOR4 */ + { "RNLM", "render layer manager", 1, NULL }, /* FOR4 */ + { "RPHO", "phong ?", 1, NULL }, /* FOR4 */ + { "RPL2", "place texture", 1, NULL }, /* FOR4 */ + { "RPLD", "place texture", 1, NULL }, /* FOR4 */ + { "RPRJ", "projection", 1, NULL }, /* FOR4 */ + { "RTFT", "texture file", 1, NULL }, /* FOR4 */ + { "SCRP", "script", 1, NULL }, /* FOR4 */ + { "SHAD", "shadow", 1, NULL }, /* FOR4 */ + { "SLCT", "select", 0, NULL }, /* evil ;) */ + { "STR ", "string", 0, maya_cb_STR_ }, + { "TGEO", "transform geometry", 1, NULL }, /* FOR4 */ + { "TUNI", "time unit", 0, NULL }, + { "UVER", "minor version?", 0, NULL }, + { "VERS", "version", 0, NULL }, + { "XFRM", "transformation", 1, maya_cb_XFRM }, + + { NULL, NULL, 0, NULL } +}; + +#endif /* _IMP_MAYA_CHUNKS_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.c new file mode 100644 index 0000000..d55bc71 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.c @@ -0,0 +1,110 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +#include + +#include "imp_maya_obj.h" + +MayaObject *maya_obj_new(void) +{ + MayaObject *obj; + + obj = g_new0(MayaObject, 1); + obj->vars = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + + return obj; +} + +void maya_obj_free(MayaObject *obj) +{ + g_hash_table_destroy(obj->vars); + if(obj->name) g_free(obj->name); + g_free(obj); +} + +G3DObject *maya_obj_to_g3d(MayaObject *obj) +{ + G3DObject *object; + + object = g_new0(G3DObject, 1); + object->name = obj->name ? g_strdup(obj->name) : "(unnamed)"; + + return object; +} + +static G3DObject *get_by_path(G3DModel *model, gchar *path) +{ + gchar **parts, **partp; + G3DObject *object = NULL; + GSList *olist; + + partp = parts = g_strsplit(path, "|", 0); + olist = model->objects; + while(*partp) + { + while(olist) + { + object = (G3DObject *)olist->data; + + if(strcmp(object->name, *partp) == 0) break; + + olist = olist->next; + object = NULL; + } + + if(object == NULL) return NULL; + + partp ++; + olist = object->objects; + } + + g_strfreev(parts); + + return object; +} + +gboolean maya_obj_add_to_tree(MayaObject *obj, G3DModel *model, + G3DObject *object) +{ + G3DObject *parent = NULL; + + if(obj->parent) + { + if(*(obj->parent) == '|') + parent = get_by_path(model, obj->parent + 1); + else + parent = g3d_model_get_object_by_name(model, obj->parent); + + if(parent == NULL) + g_warning( + "[Maya] maya_obj_add_to_tree: parent object '%s' not found", + obj->parent); + } + + if(parent != NULL) + parent->objects = g_slist_append(parent->objects, object); + else + model->objects = g_slist_append(model->objects, object); + + return TRUE; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.h new file mode 100644 index 0000000..6feb52e --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.h @@ -0,0 +1,41 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_MAYA_OBJ_H +#define _IMP_MAYA_OBJ_H + +#include +#include + +typedef struct { + gchar *name; + gchar *parent; + GHashTable *vars; + gpointer user_data; +} MayaObject; + +MayaObject *maya_obj_new(void); +void maya_obj_free(MayaObject *obj); +G3DObject *maya_obj_to_g3d(MayaObject *obj); +gboolean maya_obj_add_to_tree(MayaObject *obj, G3DModel *model, + G3DObject *object); + +#endif /* _IMP_MAYA_OBJ_H */ diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.c new file mode 100644 index 0000000..03bb8bf --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.c @@ -0,0 +1,60 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include + +#include "imp_maya_obj.h" + +gboolean maya_var_set(MayaObject *obj, const gchar *var, gpointer value) +{ + g_hash_table_replace(obj->vars, g_strdup(var), value); + + return TRUE; +} + +gpointer maya_var_get(MayaObject *obj, const gchar *var) +{ + gpointer val; + + val = g_hash_table_lookup(obj->vars, var); + return val; +} + +gboolean maya_var_set_double(MayaObject *obj, const gchar *var, gdouble value) +{ + gdouble *pval; + + pval = g_new0(gdouble, 1); + *pval = value; + + return maya_var_set(obj, var, pval); +} + +gdouble maya_var_get_double(MayaObject *obj, const gchar *var, gdouble defval) +{ + gdouble *pval; + + pval = maya_var_get(obj, var); + if(pval == NULL) + return defval; + + return *pval; +} diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.h new file mode 100644 index 0000000..f0aa66c --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.h @@ -0,0 +1,33 @@ +/* $Id$ */ + +/* + libg3d - 3D object loading library + + Copyright (C) 2005-2009 Markus Dahms + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#ifndef _IMP_MAYA_VAR_H +#define _IMP_MAYA_VAR_H + +#include "imp_maya_obj.h" + +gboolean maya_var_set(MayaObject *obj, const gchar *var, gpointer value); +gpointer maya_var_get(MayaObject *obj, const gchar *var); + +gboolean maya_var_set_double(MayaObject *obj, const gchar *var, gdouble value); +gdouble maya_var_get_double(MayaObject *obj, const gchar *var, gdouble defval); + +#endif /* _IMP_MAYA_VAR_H */ -- cgit v1.1