aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-29 02:16:55 +1000
committerDavid Walter Seikel2016-03-29 02:16:55 +1000
commitcb3716ffb584fe0f593b6f1669a8efdba1305104 (patch)
tree5d1ebc4b6fc17b30f4b34e7e64a2d9514893459b /src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya
parentAdd Prosody build script. (diff)
downloadSledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.zip
SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.gz
SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.bz2
SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.xz
Added my version of libg3d and friends.
Diffstat (limited to '')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile518
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.am25
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/Makefile.in518
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya.c77
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.c645
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_callbacks.h43
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_chunks.h130
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.c110
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_obj.h41
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.c60
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya/imp_maya_var.h33
11 files changed, 2200 insertions, 0 deletions
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 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# plugins/import/imp_maya/Makefile. Generated from Makefile.in by configure.
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15
16
17
18pkgdatadir = $(datadir)/libg3d
19pkglibdir = $(libdir)/libg3d
20pkgincludedir = $(includedir)/libg3d
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = x86_64-unknown-linux-gnu
34host_triplet = x86_64-unknown-linux-gnu
35subdir = plugins/import/imp_maya
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
39 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
40 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
42 $(top_srcdir)/configure.in
43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 $(ACLOCAL_M4)
45mkinstalldirs = $(install_sh) -d
46CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
47CONFIG_CLEAN_FILES =
48am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49am__vpath_adj = case $$p in \
50 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51 *) f=$$p;; \
52 esac;
53am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54am__installdirs = "$(DESTDIR)$(pluginimpdir)"
55pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
56LTLIBRARIES = $(pluginimp_LTLIBRARIES)
57imp_maya_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_maya_la_OBJECTS = imp_maya.lo imp_maya_callbacks.lo \
59 imp_maya_obj.lo imp_maya_var.lo
60imp_maya_la_OBJECTS = $(am_imp_maya_la_OBJECTS)
61#am_imp_maya_la_rpath = -rpath $(pluginimpdir)
62DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d
63depcomp = $(SHELL) $(top_srcdir)/config/depcomp
64am__depfiles_maybe = depfiles
65COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
66 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
69 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
70CCLD = $(CC)
71LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
72 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
73 $(LDFLAGS) -o $@
74SOURCES = $(imp_maya_la_SOURCES)
75DIST_SOURCES = $(imp_maya_la_SOURCES)
76ETAGS = etags
77CTAGS = ctags
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10
80AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar
81AR = ar
82AS = as
83AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf
84AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader
85AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10
86AWK = gawk
87CC = gcc
88CCDEPMODE = depmode=gcc3
89CFLAGS = -g -O2
90CPP = gcc -E
91CPPFLAGS =
92CXX = g++
93CXXCPP = g++ -E
94CXXDEPMODE = depmode=gcc3
95CXXFLAGS = -g -O2
96CYGPATH_W = echo
97DBG_CFLAGS = -O2
98DEBUG = 0
99DEFS = -DHAVE_CONFIG_H
100DEPDIR = .deps
101DLLTOOL = dlltool
102ECHO = echo
103ECHO_C =
104ECHO_N = -n
105ECHO_T =
106EGREP = /bin/grep -E
107EXEEXT =
108F77 =
109FFLAGS =
110GDKPIXBUF_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
111GDKPIXBUF_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
112GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
113GLIB_GENMARSHAL = glib-genmarshal
114GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
115GLIB_MKENUMS = glib-mkenums
116GOBJECT_QUERY = gobject-query
117GREP = /bin/grep
118GTKDOC_CHECK = /usr/bin/gtkdoc-check
119GTK_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
120GTK_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
121HTML_DIR = ${datadir}/gtk-doc/html
122INSTALL = /usr/bin/install -c
123INSTALL_DATA = ${INSTALL} -m 644
124INSTALL_PROGRAM = ${INSTALL}
125INSTALL_SCRIPT = ${INSTALL}
126INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
127LDFLAGS =
128LEX = flex
129LEXLIB = -lfl
130LEX_OUTPUT_ROOT = lex.yy
131LIBGSF_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
132LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0
133LIBOBJS =
134LIBS = -lm
135LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet
136LIBXML2_CFLAGS = -I/usr/include/libxml2
137LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
138LN_S = ln -s
139LTLIBOBJS =
140LTVERSION = 0:8:0
141MAGIC_LIBS = -lmagic
142MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo
143MATH_LIBS = -lm
144MKDIR_P = /bin/mkdir -p
145OBJDUMP = objdump
146OBJEXT = o
147PACKAGE = libg3d
148PACKAGE_BUGREPORT =
149PACKAGE_NAME =
150PACKAGE_STRING =
151PACKAGE_TARNAME =
152PACKAGE_VERSION =
153PATH_SEPARATOR = :
154PKG_CONFIG = /usr/bin/pkg-config
155PLUGINS_LDFLAGS = -avoid-version -export-dynamic
156RANLIB = ranlib
157SET_MAKE =
158SHELL = /bin/bash
159STRIP = strip
160VERSION = 0.0.8
161XML2_CONFIG = /usr/bin/xml2-config
162XML_CPPFLAGS = -I/usr/include/libxml2
163XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
164Z_CFLAGS =
165Z_LIBS = -lz
166abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya
167abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya
168abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
169abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
170ac_ct_CC = gcc
171ac_ct_CXX = g++
172ac_ct_F77 =
173am__include = include
174am__leading_dot = .
175am__quote =
176am__tar = ${AMTAR} chof - "$$tardir"
177am__untar = ${AMTAR} xf -
178bindir = ${exec_prefix}/bin
179build = x86_64-unknown-linux-gnu
180build_alias =
181build_cpu = x86_64
182build_os = linux-gnu
183build_vendor = unknown
184builddir = .
185datadir = ${datarootdir}
186datarootdir = ${prefix}/share
187docdir = ${datarootdir}/doc/${PACKAGE}
188dvidir = ${docdir}
189exec_prefix = ${prefix}
190host = x86_64-unknown-linux-gnu
191host_alias =
192host_cpu = x86_64
193host_os = linux-gnu
194host_vendor = unknown
195htmldir = ${docdir}
196includedir = ${prefix}/include
197infodir = ${datarootdir}/info
198install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh
199libdir = ${exec_prefix}/lib
200libexecdir = ${exec_prefix}/libexec
201localedir = ${datarootdir}/locale
202localstatedir = ${prefix}/var
203mandir = ${datarootdir}/man
204mkdir_p = /bin/mkdir -p
205oldincludedir = /usr/include
206pdfdir = ${docdir}
207prefix = /usr/local
208program_transform_name = s,x,x,
209psdir = ${docdir}
210sbindir = ${exec_prefix}/sbin
211sharedstatedir = ${prefix}/com
212srcdir = .
213sysconfdir = ${prefix}/etc
214target_alias =
215top_builddir = ../../..
216top_srcdir = ../../..
217pluginimpdir = $(pkglibdir)/plugins/import
218#pluginimp_LTLIBRARIES = imp_maya.la
219AM_CFLAGS = \
220 -Wall -ansi -pedantic \
221 -DG_LOG_DOMAIN=\"LibG3D\" \
222 -O2 -DDEBUG=0 \
223 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
224
225INCLUDES = -I$(top_srcdir)/include
226AM_LDFLAGS = \
227 -no-undefined -module \
228 -avoid-version -export-dynamic
229
230imp_maya_la_SOURCES = imp_maya.c imp_maya_chunks.h \
231 imp_maya_callbacks.c imp_maya_callbacks.h \
232 imp_maya_obj.c imp_maya_obj.h \
233 imp_maya_var.c imp_maya_var.h
234
235imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
236all: all-am
237
238.SUFFIXES:
239.SUFFIXES: .c .lo .o .obj
240$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
241 @for dep in $?; do \
242 case '$(am__configure_deps)' in \
243 *$$dep*) \
244 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
245 && exit 0; \
246 exit 1;; \
247 esac; \
248 done; \
249 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile'; \
250 cd $(top_srcdir) && \
251 $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile
252.PRECIOUS: Makefile
253Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
254 @case '$?' in \
255 *config.status*) \
256 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
257 *) \
258 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
259 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
260 esac;
261
262$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
263 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
264
265$(top_srcdir)/configure: $(am__configure_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267$(ACLOCAL_M4): $(am__aclocal_m4_deps)
268 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
269install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
270 @$(NORMAL_INSTALL)
271 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
272 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
273 if test -f $$p; then \
274 f=$(am__strip_dir) \
275 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
276 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
277 else :; fi; \
278 done
279
280uninstall-pluginimpLTLIBRARIES:
281 @$(NORMAL_UNINSTALL)
282 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
283 p=$(am__strip_dir) \
284 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
285 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
286 done
287
288clean-pluginimpLTLIBRARIES:
289 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
290 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
291 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
292 test "$$dir" != "$$p" || dir=.; \
293 echo "rm -f \"$${dir}/so_locations\""; \
294 rm -f "$${dir}/so_locations"; \
295 done
296imp_maya.la: $(imp_maya_la_OBJECTS) $(imp_maya_la_DEPENDENCIES)
297 $(LINK) $(am_imp_maya_la_rpath) $(imp_maya_la_OBJECTS) $(imp_maya_la_LIBADD) $(LIBS)
298
299mostlyclean-compile:
300 -rm -f *.$(OBJEXT)
301
302distclean-compile:
303 -rm -f *.tab.c
304
305include ./$(DEPDIR)/imp_maya.Plo
306include ./$(DEPDIR)/imp_maya_callbacks.Plo
307include ./$(DEPDIR)/imp_maya_obj.Plo
308include ./$(DEPDIR)/imp_maya_var.Plo
309
310.c.o:
311 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
312 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
313# source='$<' object='$@' libtool=no \
314# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
315# $(COMPILE) -c $<
316
317.c.obj:
318 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
319 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
320# source='$<' object='$@' libtool=no \
321# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
322# $(COMPILE) -c `$(CYGPATH_W) '$<'`
323
324.c.lo:
325 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
326 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
327# source='$<' object='$@' libtool=yes \
328# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
329# $(LTCOMPILE) -c -o $@ $<
330
331mostlyclean-libtool:
332 -rm -f *.lo
333
334clean-libtool:
335 -rm -rf .libs _libs
336
337ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
338 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
339 unique=`for i in $$list; do \
340 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
341 done | \
342 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
343 END { if (nonempty) { for (i in files) print i; }; }'`; \
344 mkid -fID $$unique
345tags: TAGS
346
347TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
348 $(TAGS_FILES) $(LISP)
349 tags=; \
350 here=`pwd`; \
351 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
352 unique=`for i in $$list; do \
353 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
354 done | \
355 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
356 END { if (nonempty) { for (i in files) print i; }; }'`; \
357 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
358 test -n "$$unique" || unique=$$empty_fix; \
359 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
360 $$tags $$unique; \
361 fi
362ctags: CTAGS
363CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
364 $(TAGS_FILES) $(LISP)
365 tags=; \
366 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
367 unique=`for i in $$list; do \
368 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
369 done | \
370 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
371 END { if (nonempty) { for (i in files) print i; }; }'`; \
372 test -z "$(CTAGS_ARGS)$$tags$$unique" \
373 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
374 $$tags $$unique
375
376GTAGS:
377 here=`$(am__cd) $(top_builddir) && pwd` \
378 && cd $(top_srcdir) \
379 && gtags -i $(GTAGS_ARGS) $$here
380
381distclean-tags:
382 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
383
384distdir: $(DISTFILES)
385 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
386 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
387 list='$(DISTFILES)'; \
388 dist_files=`for file in $$list; do echo $$file; done | \
389 sed -e "s|^$$srcdirstrip/||;t" \
390 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
391 case $$dist_files in \
392 */*) $(MKDIR_P) `echo "$$dist_files" | \
393 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
394 sort -u` ;; \
395 esac; \
396 for file in $$dist_files; do \
397 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
398 if test -d $$d/$$file; then \
399 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
400 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
401 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
402 fi; \
403 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
404 else \
405 test -f $(distdir)/$$file \
406 || cp -p $$d/$$file $(distdir)/$$file \
407 || exit 1; \
408 fi; \
409 done
410check-am: all-am
411check: check-am
412all-am: Makefile $(LTLIBRARIES)
413installdirs:
414 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
415 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
416 done
417install: install-am
418install-exec: install-exec-am
419install-data: install-data-am
420uninstall: uninstall-am
421
422install-am: all-am
423 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
424
425installcheck: installcheck-am
426install-strip:
427 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
428 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
429 `test -z '$(STRIP)' || \
430 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
431mostlyclean-generic:
432
433clean-generic:
434
435distclean-generic:
436 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
437
438maintainer-clean-generic:
439 @echo "This command is intended for maintainers to use"
440 @echo "it deletes files that may require special tools to rebuild."
441clean: clean-am
442
443clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
444 mostlyclean-am
445
446distclean: distclean-am
447 -rm -rf ./$(DEPDIR)
448 -rm -f Makefile
449distclean-am: clean-am distclean-compile distclean-generic \
450 distclean-tags
451
452dvi: dvi-am
453
454dvi-am:
455
456html: html-am
457
458info: info-am
459
460info-am:
461
462install-data-am: install-pluginimpLTLIBRARIES
463
464install-dvi: install-dvi-am
465
466install-exec-am:
467
468install-html: install-html-am
469
470install-info: install-info-am
471
472install-man:
473
474install-pdf: install-pdf-am
475
476install-ps: install-ps-am
477
478installcheck-am:
479
480maintainer-clean: maintainer-clean-am
481 -rm -rf ./$(DEPDIR)
482 -rm -f Makefile
483maintainer-clean-am: distclean-am maintainer-clean-generic
484
485mostlyclean: mostlyclean-am
486
487mostlyclean-am: mostlyclean-compile mostlyclean-generic \
488 mostlyclean-libtool
489
490pdf: pdf-am
491
492pdf-am:
493
494ps: ps-am
495
496ps-am:
497
498uninstall-am: uninstall-pluginimpLTLIBRARIES
499
500.MAKE: install-am install-strip
501
502.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
503 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
504 distclean-compile distclean-generic distclean-libtool \
505 distclean-tags distdir dvi dvi-am html html-am info info-am \
506 install install-am install-data install-data-am install-dvi \
507 install-dvi-am install-exec install-exec-am install-html \
508 install-html-am install-info install-info-am install-man \
509 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
510 install-ps install-ps-am install-strip installcheck \
511 installcheck-am installdirs maintainer-clean \
512 maintainer-clean-generic mostlyclean mostlyclean-compile \
513 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
514 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
515
516# Tell versions [3.59,3.63) of GNU make to not export all variables.
517# Otherwise a system limit (for SysV at least) may be exceeded.
518.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 @@
1pluginimpdir = $(pkglibdir)/plugins/import
2
3if EXPERIMENTAL
4pluginimp_LTLIBRARIES = imp_maya.la
5endif
6
7AM_CFLAGS = \
8 -Wall -ansi -pedantic \
9 -DG_LOG_DOMAIN=\"LibG3D\" \
10 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
11 @GLIB_CFLAGS@
12
13INCLUDES = -I$(top_srcdir)/include
14
15AM_LDFLAGS = \
16 -no-undefined -module \
17 @PLUGINS_LDFLAGS@
18
19LIBTOOL += --quiet
20
21imp_maya_la_SOURCES = imp_maya.c imp_maya_chunks.h \
22 imp_maya_callbacks.c imp_maya_callbacks.h \
23 imp_maya_obj.c imp_maya_obj.h \
24 imp_maya_var.c imp_maya_var.h
25imp_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 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkglibdir = $(libdir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = @build@
34host_triplet = @host@
35subdir = plugins/import/imp_maya
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
39 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
40 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
42 $(top_srcdir)/configure.in
43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 $(ACLOCAL_M4)
45mkinstalldirs = $(install_sh) -d
46CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
47CONFIG_CLEAN_FILES =
48am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49am__vpath_adj = case $$p in \
50 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51 *) f=$$p;; \
52 esac;
53am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54am__installdirs = "$(DESTDIR)$(pluginimpdir)"
55pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
56LTLIBRARIES = $(pluginimp_LTLIBRARIES)
57imp_maya_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_maya_la_OBJECTS = imp_maya.lo imp_maya_callbacks.lo \
59 imp_maya_obj.lo imp_maya_var.lo
60imp_maya_la_OBJECTS = $(am_imp_maya_la_OBJECTS)
61@EXPERIMENTAL_TRUE@am_imp_maya_la_rpath = -rpath $(pluginimpdir)
62DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d
63depcomp = $(SHELL) $(top_srcdir)/config/depcomp
64am__depfiles_maybe = depfiles
65COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
66 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
69 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
70CCLD = $(CC)
71LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
72 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
73 $(LDFLAGS) -o $@
74SOURCES = $(imp_maya_la_SOURCES)
75DIST_SOURCES = $(imp_maya_la_SOURCES)
76ETAGS = etags
77CTAGS = ctags
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = @ACLOCAL@
80AMTAR = @AMTAR@
81AR = @AR@
82AS = @AS@
83AUTOCONF = @AUTOCONF@
84AUTOHEADER = @AUTOHEADER@
85AUTOMAKE = @AUTOMAKE@
86AWK = @AWK@
87CC = @CC@
88CCDEPMODE = @CCDEPMODE@
89CFLAGS = @CFLAGS@
90CPP = @CPP@
91CPPFLAGS = @CPPFLAGS@
92CXX = @CXX@
93CXXCPP = @CXXCPP@
94CXXDEPMODE = @CXXDEPMODE@
95CXXFLAGS = @CXXFLAGS@
96CYGPATH_W = @CYGPATH_W@
97DBG_CFLAGS = @DBG_CFLAGS@
98DEBUG = @DEBUG@
99DEFS = @DEFS@
100DEPDIR = @DEPDIR@
101DLLTOOL = @DLLTOOL@
102ECHO = @ECHO@
103ECHO_C = @ECHO_C@
104ECHO_N = @ECHO_N@
105ECHO_T = @ECHO_T@
106EGREP = @EGREP@
107EXEEXT = @EXEEXT@
108F77 = @F77@
109FFLAGS = @FFLAGS@
110GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
111GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
112GLIB_CFLAGS = @GLIB_CFLAGS@
113GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
114GLIB_LIBS = @GLIB_LIBS@
115GLIB_MKENUMS = @GLIB_MKENUMS@
116GOBJECT_QUERY = @GOBJECT_QUERY@
117GREP = @GREP@
118GTKDOC_CHECK = @GTKDOC_CHECK@
119GTK_CFLAGS = @GTK_CFLAGS@
120GTK_LIBS = @GTK_LIBS@
121HTML_DIR = @HTML_DIR@
122INSTALL = @INSTALL@
123INSTALL_DATA = @INSTALL_DATA@
124INSTALL_PROGRAM = @INSTALL_PROGRAM@
125INSTALL_SCRIPT = @INSTALL_SCRIPT@
126INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
127LDFLAGS = @LDFLAGS@
128LEX = @LEX@
129LEXLIB = @LEXLIB@
130LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
131LIBGSF_CFLAGS = @LIBGSF_CFLAGS@
132LIBGSF_LIBS = @LIBGSF_LIBS@
133LIBOBJS = @LIBOBJS@
134LIBS = @LIBS@
135LIBTOOL = @LIBTOOL@ --quiet
136LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
137LIBXML2_LIBS = @LIBXML2_LIBS@
138LN_S = @LN_S@
139LTLIBOBJS = @LTLIBOBJS@
140LTVERSION = @LTVERSION@
141MAGIC_LIBS = @MAGIC_LIBS@
142MAKEINFO = @MAKEINFO@
143MATH_LIBS = @MATH_LIBS@
144MKDIR_P = @MKDIR_P@
145OBJDUMP = @OBJDUMP@
146OBJEXT = @OBJEXT@
147PACKAGE = @PACKAGE@
148PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
149PACKAGE_NAME = @PACKAGE_NAME@
150PACKAGE_STRING = @PACKAGE_STRING@
151PACKAGE_TARNAME = @PACKAGE_TARNAME@
152PACKAGE_VERSION = @PACKAGE_VERSION@
153PATH_SEPARATOR = @PATH_SEPARATOR@
154PKG_CONFIG = @PKG_CONFIG@
155PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@
156RANLIB = @RANLIB@
157SET_MAKE = @SET_MAKE@
158SHELL = @SHELL@
159STRIP = @STRIP@
160VERSION = @VERSION@
161XML2_CONFIG = @XML2_CONFIG@
162XML_CPPFLAGS = @XML_CPPFLAGS@
163XML_LIBS = @XML_LIBS@
164Z_CFLAGS = @Z_CFLAGS@
165Z_LIBS = @Z_LIBS@
166abs_builddir = @abs_builddir@
167abs_srcdir = @abs_srcdir@
168abs_top_builddir = @abs_top_builddir@
169abs_top_srcdir = @abs_top_srcdir@
170ac_ct_CC = @ac_ct_CC@
171ac_ct_CXX = @ac_ct_CXX@
172ac_ct_F77 = @ac_ct_F77@
173am__include = @am__include@
174am__leading_dot = @am__leading_dot@
175am__quote = @am__quote@
176am__tar = @am__tar@
177am__untar = @am__untar@
178bindir = @bindir@
179build = @build@
180build_alias = @build_alias@
181build_cpu = @build_cpu@
182build_os = @build_os@
183build_vendor = @build_vendor@
184builddir = @builddir@
185datadir = @datadir@
186datarootdir = @datarootdir@
187docdir = @docdir@
188dvidir = @dvidir@
189exec_prefix = @exec_prefix@
190host = @host@
191host_alias = @host_alias@
192host_cpu = @host_cpu@
193host_os = @host_os@
194host_vendor = @host_vendor@
195htmldir = @htmldir@
196includedir = @includedir@
197infodir = @infodir@
198install_sh = @install_sh@
199libdir = @libdir@
200libexecdir = @libexecdir@
201localedir = @localedir@
202localstatedir = @localstatedir@
203mandir = @mandir@
204mkdir_p = @mkdir_p@
205oldincludedir = @oldincludedir@
206pdfdir = @pdfdir@
207prefix = @prefix@
208program_transform_name = @program_transform_name@
209psdir = @psdir@
210sbindir = @sbindir@
211sharedstatedir = @sharedstatedir@
212srcdir = @srcdir@
213sysconfdir = @sysconfdir@
214target_alias = @target_alias@
215top_builddir = @top_builddir@
216top_srcdir = @top_srcdir@
217pluginimpdir = $(pkglibdir)/plugins/import
218@EXPERIMENTAL_TRUE@pluginimp_LTLIBRARIES = imp_maya.la
219AM_CFLAGS = \
220 -Wall -ansi -pedantic \
221 -DG_LOG_DOMAIN=\"LibG3D\" \
222 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
223 @GLIB_CFLAGS@
224
225INCLUDES = -I$(top_srcdir)/include
226AM_LDFLAGS = \
227 -no-undefined -module \
228 @PLUGINS_LDFLAGS@
229
230imp_maya_la_SOURCES = imp_maya.c imp_maya_chunks.h \
231 imp_maya_callbacks.c imp_maya_callbacks.h \
232 imp_maya_obj.c imp_maya_obj.h \
233 imp_maya_var.c imp_maya_var.h
234
235imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@
236all: all-am
237
238.SUFFIXES:
239.SUFFIXES: .c .lo .o .obj
240$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
241 @for dep in $?; do \
242 case '$(am__configure_deps)' in \
243 *$$dep*) \
244 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
245 && exit 0; \
246 exit 1;; \
247 esac; \
248 done; \
249 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile'; \
250 cd $(top_srcdir) && \
251 $(AUTOMAKE) --gnu plugins/import/imp_maya/Makefile
252.PRECIOUS: Makefile
253Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
254 @case '$?' in \
255 *config.status*) \
256 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
257 *) \
258 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
259 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
260 esac;
261
262$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
263 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
264
265$(top_srcdir)/configure: $(am__configure_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267$(ACLOCAL_M4): $(am__aclocal_m4_deps)
268 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
269install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
270 @$(NORMAL_INSTALL)
271 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
272 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
273 if test -f $$p; then \
274 f=$(am__strip_dir) \
275 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
276 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
277 else :; fi; \
278 done
279
280uninstall-pluginimpLTLIBRARIES:
281 @$(NORMAL_UNINSTALL)
282 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
283 p=$(am__strip_dir) \
284 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
285 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
286 done
287
288clean-pluginimpLTLIBRARIES:
289 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
290 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
291 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
292 test "$$dir" != "$$p" || dir=.; \
293 echo "rm -f \"$${dir}/so_locations\""; \
294 rm -f "$${dir}/so_locations"; \
295 done
296imp_maya.la: $(imp_maya_la_OBJECTS) $(imp_maya_la_DEPENDENCIES)
297 $(LINK) $(am_imp_maya_la_rpath) $(imp_maya_la_OBJECTS) $(imp_maya_la_LIBADD) $(LIBS)
298
299mostlyclean-compile:
300 -rm -f *.$(OBJEXT)
301
302distclean-compile:
303 -rm -f *.tab.c
304
305@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya.Plo@am__quote@
306@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya_callbacks.Plo@am__quote@
307@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya_obj.Plo@am__quote@
308@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_maya_var.Plo@am__quote@
309
310.c.o:
311@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
312@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
313@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
314@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
315@am__fastdepCC_FALSE@ $(COMPILE) -c $<
316
317.c.obj:
318@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
319@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
320@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
321@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
322@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
323
324.c.lo:
325@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
326@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
327@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
328@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
329@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
330
331mostlyclean-libtool:
332 -rm -f *.lo
333
334clean-libtool:
335 -rm -rf .libs _libs
336
337ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
338 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
339 unique=`for i in $$list; do \
340 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
341 done | \
342 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
343 END { if (nonempty) { for (i in files) print i; }; }'`; \
344 mkid -fID $$unique
345tags: TAGS
346
347TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
348 $(TAGS_FILES) $(LISP)
349 tags=; \
350 here=`pwd`; \
351 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
352 unique=`for i in $$list; do \
353 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
354 done | \
355 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
356 END { if (nonempty) { for (i in files) print i; }; }'`; \
357 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
358 test -n "$$unique" || unique=$$empty_fix; \
359 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
360 $$tags $$unique; \
361 fi
362ctags: CTAGS
363CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
364 $(TAGS_FILES) $(LISP)
365 tags=; \
366 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
367 unique=`for i in $$list; do \
368 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
369 done | \
370 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
371 END { if (nonempty) { for (i in files) print i; }; }'`; \
372 test -z "$(CTAGS_ARGS)$$tags$$unique" \
373 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
374 $$tags $$unique
375
376GTAGS:
377 here=`$(am__cd) $(top_builddir) && pwd` \
378 && cd $(top_srcdir) \
379 && gtags -i $(GTAGS_ARGS) $$here
380
381distclean-tags:
382 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
383
384distdir: $(DISTFILES)
385 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
386 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
387 list='$(DISTFILES)'; \
388 dist_files=`for file in $$list; do echo $$file; done | \
389 sed -e "s|^$$srcdirstrip/||;t" \
390 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
391 case $$dist_files in \
392 */*) $(MKDIR_P) `echo "$$dist_files" | \
393 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
394 sort -u` ;; \
395 esac; \
396 for file in $$dist_files; do \
397 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
398 if test -d $$d/$$file; then \
399 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
400 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
401 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
402 fi; \
403 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
404 else \
405 test -f $(distdir)/$$file \
406 || cp -p $$d/$$file $(distdir)/$$file \
407 || exit 1; \
408 fi; \
409 done
410check-am: all-am
411check: check-am
412all-am: Makefile $(LTLIBRARIES)
413installdirs:
414 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
415 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
416 done
417install: install-am
418install-exec: install-exec-am
419install-data: install-data-am
420uninstall: uninstall-am
421
422install-am: all-am
423 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
424
425installcheck: installcheck-am
426install-strip:
427 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
428 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
429 `test -z '$(STRIP)' || \
430 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
431mostlyclean-generic:
432
433clean-generic:
434
435distclean-generic:
436 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
437
438maintainer-clean-generic:
439 @echo "This command is intended for maintainers to use"
440 @echo "it deletes files that may require special tools to rebuild."
441clean: clean-am
442
443clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
444 mostlyclean-am
445
446distclean: distclean-am
447 -rm -rf ./$(DEPDIR)
448 -rm -f Makefile
449distclean-am: clean-am distclean-compile distclean-generic \
450 distclean-tags
451
452dvi: dvi-am
453
454dvi-am:
455
456html: html-am
457
458info: info-am
459
460info-am:
461
462install-data-am: install-pluginimpLTLIBRARIES
463
464install-dvi: install-dvi-am
465
466install-exec-am:
467
468install-html: install-html-am
469
470install-info: install-info-am
471
472install-man:
473
474install-pdf: install-pdf-am
475
476install-ps: install-ps-am
477
478installcheck-am:
479
480maintainer-clean: maintainer-clean-am
481 -rm -rf ./$(DEPDIR)
482 -rm -f Makefile
483maintainer-clean-am: distclean-am maintainer-clean-generic
484
485mostlyclean: mostlyclean-am
486
487mostlyclean-am: mostlyclean-compile mostlyclean-generic \
488 mostlyclean-libtool
489
490pdf: pdf-am
491
492pdf-am:
493
494ps: ps-am
495
496ps-am:
497
498uninstall-am: uninstall-pluginimpLTLIBRARIES
499
500.MAKE: install-am install-strip
501
502.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
503 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
504 distclean-compile distclean-generic distclean-libtool \
505 distclean-tags distdir dvi dvi-am html html-am info info-am \
506 install install-am install-data install-data-am install-dvi \
507 install-dvi-am install-exec install-exec-am install-html \
508 install-html-am install-info install-info-am install-man \
509 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
510 install-ps install-ps-am install-strip installcheck \
511 installcheck-am installdirs maintainer-clean \
512 maintainer-clean-generic mostlyclean mostlyclean-compile \
513 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
514 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
515
516# Tell versions [3.59,3.63) of GNU make to not export all variables.
517# Otherwise a system limit (for SysV at least) may be exceeded.
518.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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22
23#include <stdio.h>
24#include <string.h>
25
26#include <glib.h>
27
28#include <g3d/iff.h>
29#include <g3d/stream.h>
30
31#include "imp_maya_chunks.h"
32
33EAPI
34gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream,
35 G3DModel *model, gpointer user_data)
36{
37 G3DIffGlobal *global;
38 G3DIffLocal *local;
39 guint32 id;
40 gsize len;
41
42 if(!g3d_iff_check(stream, &id, &len) ||
43 (id != G3D_IFF_MKID('M','a','y','a'))) {
44 g_warning("file is not an Maya file %s", stream->uri);
45 return FALSE;
46 }
47
48 local = g_new0(G3DIffLocal, 1);
49 global = g_new0(G3DIffGlobal, 1);
50
51 global->context = context;
52 global->model = model;
53 global->stream = stream;
54
55 local->parent_id = id;
56 local->nb = len;
57
58 g3d_iff_read_ctnr(global, local, maya_chunks, G3D_IFF_PAD4);
59
60 g_free(local);
61 g_free(global);
62
63 return TRUE;
64}
65
66EAPI
67gchar *plugin_description(void)
68{
69 return g_strdup("Maya models.");
70}
71
72EAPI
73gchar **plugin_extensions(void)
74{
75 return g_strsplit("mb", ":", 0);
76}
77
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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#include <string.h>
23
24#include <g3d/iff.h>
25#include <g3d/model.h>
26#include <g3d/material.h>
27#include <g3d/primitive.h>
28#include <g3d/stream.h>
29#include <g3d/matrix.h>
30#include <g3d/debug.h>
31
32#include "imp_maya_obj.h"
33#include "imp_maya_var.h"
34
35/* compound? */
36gboolean maya_cb_CMPD(G3DIffGlobal *global, G3DIffLocal *local)
37{
38 gint32 flags, i;
39 gdouble *val;
40 gchar *var;
41 gchar *padding = " ";
42
43 if(local->nb < 26)
44 {
45 g_warning("[Maya][CMPD] size: %d", local->nb);
46 return FALSE;
47 }
48
49 /* var */
50 var = g_new0(gchar, local->nb - 25);
51 g3d_stream_read(global->stream, var, local->nb - 25);
52 local->nb -= (local->nb - 25);
53
54 /* flags ? */
55 flags = g3d_stream_read_int8(global->stream);
56 local->nb -= 1;
57
58 val = g_new0(gdouble, 3);
59
60 for(i = 0; i < 3; i ++)
61 {
62 val[i] = g3d_stream_read_double_be(global->stream);
63 local->nb -= 8;
64 }
65
66 g_debug("\\%s[Maya][CMPD] %s = [%g %g %g]",
67 padding + (strlen(padding) - local->level),
68 var,
69 val[0], val[1], val[2]);
70
71 if(local->object)
72 maya_var_set((MayaObject *)local->object, var, val);
73 else
74 g_free(val);
75
76 g_free(var);
77
78 return TRUE;
79}
80
81/* creator */
82gboolean maya_cb_CREA(G3DIffGlobal *global, G3DIffLocal *local)
83{
84 MayaObject *obj;
85 gint32 max_len, flags;
86 gchar *buffer, *name;
87 gchar *padding = " ";
88
89 /* flags ? */
90 flags = g3d_stream_read_int8(global->stream);
91 local->nb -= 1;
92
93 max_len = local->nb;
94 buffer = g_malloc(max_len + 1);
95
96 /* object name */
97 local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len);
98 name = g_strdup(buffer);
99
100 obj = (MayaObject *)local->object;
101 if(obj)
102 obj->name = g_strdup(buffer);
103
104 /* parent name */
105 if(local->nb > 0)
106 local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len);
107 else
108 *buffer = '\0';
109
110 if(obj && *buffer)
111 obj->parent = g_strdup(buffer);
112
113 g_debug("\\%s[Maya][CREA] %s (%s)",
114 padding + (strlen(padding) - local->level),
115 name, *buffer ? buffer : "none");
116
117 g_free(buffer);
118 g_free(name);
119
120 return TRUE;
121}
122
123gboolean maya_cb_CWFL(G3DIffGlobal *global, G3DIffLocal *local)
124{
125 gchar *buffer, *name;
126 gchar *padding = " ";
127 guint32 flags, max_len;
128
129 /* flags ? */
130 flags = g3d_stream_read_int8(global->stream);
131 local->nb -= 1;
132
133 max_len = local->nb;
134 buffer = g_malloc(max_len + 1);
135
136 local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len);
137 name = g_strdup(buffer);
138
139 local->nb -= g3d_stream_read_cstr(global->stream, buffer, max_len);
140
141 g_debug("\\%s[Maya][CWFL] %s; %s (flags: %u, %d bytes left)",
142 padding + (strlen(padding) - local->level),
143 name, buffer, flags, local->nb);
144
145 g_free(name);
146 g_free(buffer);
147
148 return TRUE;
149}
150
151/* double # */
152gboolean maya_cb_DBLn(G3DIffGlobal *global, G3DIffLocal *local)
153{
154 gint32 len, flags, ndbl, i;
155 gdouble *val;
156 gchar *var;
157 gchar *padding = " ";
158
159 len = local->nb - 9;
160 var = g_malloc(len);
161 g3d_stream_read(global->stream, var, len);
162 local->nb -= len;
163
164 flags = g3d_stream_read_int8(global->stream);
165 local->nb -= 1;
166
167 ndbl = local->nb / 8;
168 val = g_new0(gdouble, ndbl);
169 for(i = 0; i < ndbl; i ++)
170 {
171 val[i] = g3d_stream_read_double_be(global->stream);
172 local->nb -= 8;
173 }
174
175 g_debug("\\%s[Maya][DBL#] %s (%d doubles) (0x%02X)",
176 padding + (strlen(padding) - local->level),
177 var, ndbl, flags);
178
179 if(local->object)
180 maya_var_set((MayaObject *)local->object, var, val);
181 else
182 g_free(val);
183
184 g_free(var);
185
186 return TRUE;
187}
188
189/* double 2 */
190gboolean maya_cb_DBL2(G3DIffGlobal *global, G3DIffLocal *local)
191{
192 gint32 len, flags;
193 gdouble *val;
194 gchar *var;
195 gchar *padding = " ";
196
197 len = local->nb - 17;
198 var = g_malloc(len);
199 g3d_stream_read(global->stream, var, len);
200 local->nb -= len;
201
202 flags = g3d_stream_read_int8(global->stream);
203 local->nb -= 1;
204
205 val = g_new0(gdouble, 2);
206 val[0] = g3d_stream_read_double_be(global->stream);
207 val[1] = g3d_stream_read_double_be(global->stream);
208 local->nb -= 16;
209
210 g_debug("\\%s[Maya][DBL2] %s = (%g,%g) (0x%02X)",
211 padding + (strlen(padding) - local->level),
212 var, val[0], val[1], flags);
213
214 if(local->object)
215 maya_var_set((MayaObject *)local->object, var, val);
216 else
217 g_free(val);
218
219 g_free(var);
220
221 return TRUE;
222}
223
224/* double 3 */
225gboolean maya_cb_DBL3(G3DIffGlobal *global, G3DIffLocal *local)
226{
227 gint32 len, flags;
228 gdouble *val;
229 gchar *var;
230 gchar *padding = " ";
231
232 len = local->nb - 25;
233 var = g_malloc(len);
234 g3d_stream_read(global->stream, var, len);
235 local->nb -= len;
236
237 flags = g3d_stream_read_int8(global->stream);
238 local->nb -= 1;
239
240 val = g_new0(gdouble, 3);
241 val[0] = g3d_stream_read_double_be(global->stream);
242 val[1] = g3d_stream_read_double_be(global->stream);
243 val[2] = g3d_stream_read_double_be(global->stream);
244 local->nb -= 24;
245
246 g_debug("\\%s[Maya][DBL3] %s = (%g,%g,%g) (0x%02X)",
247 padding + (strlen(padding) - local->level),
248 var, val[0], val[1], val[2], flags);
249
250 if(local->object)
251 maya_var_set((MayaObject *)local->object, var, val);
252 else
253 g_free(val);
254
255 g_free(var);
256
257 return TRUE;
258}
259
260/* double */
261gboolean maya_cb_DBLE(G3DIffGlobal *global, G3DIffLocal *local)
262{
263 gint32 len, flags;
264 gdouble val;
265 gchar *var;
266 gchar *padding = " ";
267
268 len = local->nb - 9;
269 if(len <= 0)
270 {
271 g_warning("[Maya][DBLE] length of chunk: %d", local->nb);
272 return FALSE;
273 }
274
275 var = g_malloc(len);
276 g3d_stream_read(global->stream, var, len);
277 local->nb -= len;
278
279 flags = g3d_stream_read_int8(global->stream);
280 local->nb -= 1;
281
282 val = g3d_stream_read_double_be(global->stream);
283 local->nb -= 8;
284
285 g_debug("\\%s[Maya][DBLE] %s = %g (0x%02X)",
286 padding + (strlen(padding) - local->level),
287 var, val, flags);
288
289 if(local->object)
290 maya_var_set_double((MayaObject *)local->object, var, val);
291
292 g_free(var);
293
294 return TRUE;
295}
296
297/* mesh object */
298gboolean maya_cb_DMSH(G3DIffGlobal *global, G3DIffLocal *local)
299{
300 MayaObject *obj;
301 G3DObject *object, *parent;
302 G3DMaterial *material;
303
304 if(local->finalize)
305 {
306 obj = (MayaObject *)local->object;
307
308 object = (G3DObject *)obj->user_data;
309 object->name = obj->name ? g_strdup(obj->name) : "(unnamed mesh)";
310
311 if(obj->parent)
312 {
313 parent = g3d_model_get_object_by_name(global->model, obj->parent);
314 if(parent)
315 object->transformation = parent->transformation;
316 }
317
318 maya_obj_add_to_tree(obj, global->model, object);
319 maya_obj_free(obj);
320 }
321 else
322 {
323 obj = maya_obj_new();
324 local->object = obj;
325
326 material = g3d_material_new();
327 material->name = g_strdup("(default material)");
328
329 object = g_new0(G3DObject, 1);
330 object->materials = g_slist_append(object->materials, material);
331
332 obj->user_data = object;
333 }
334
335 return TRUE;
336}
337
338/* float 3 */
339gboolean maya_cb_FLT3(G3DIffGlobal *global, G3DIffLocal *local)
340{
341 gint32 len, flags;
342 G3DFloat *val;
343 gchar *var;
344 gchar *padding = " ";
345
346 len = local->nb - 13;
347 var = g_malloc(len);
348 g3d_stream_read(global->stream, var, len);
349 local->nb -= len;
350
351 flags = g3d_stream_read_int8(global->stream);
352 local->nb -= 1;
353
354 val = g_new0(G3DFloat, 3);
355 val[0] = g3d_stream_read_float_be(global->stream);
356 val[1] = g3d_stream_read_float_be(global->stream);
357 val[2] = g3d_stream_read_float_be(global->stream);
358 local->nb -= 12;
359
360 g_debug("\\%s[Maya][DBL3] %s = (%g; %g; %g) (0x%02X)",
361 padding + (strlen(padding) - local->level),
362 var, val[0], val[1], val[2], flags);
363
364 if(local->object)
365 maya_var_set((MayaObject *)local->object, var, val);
366 else
367 g_free(val);
368
369 g_free(var);
370
371 return TRUE;
372}
373
374/* matrix */
375gboolean maya_cb_MATR(G3DIffGlobal *global, G3DIffLocal *local)
376{
377 gint32 flags, i;
378 G3DFloat *val;
379 gchar *var;
380 gchar *padding = " ";
381
382 if(local->nb <= 129)
383 {
384 g_warning("[Maya][MATR] matrix size: %d", local->nb);
385 return FALSE;
386 }
387
388 /* var */
389 var = g_new0(gchar, local->nb - 129);
390 g3d_stream_read(global->stream, var, local->nb - 129);
391 local->nb -= (local->nb - 129);
392
393 /* flags ? */
394 flags = g3d_stream_read_int8(global->stream);
395 local->nb -= 1;
396
397 val = g_new0(G3DFloat, 16);
398
399 for(i = 0; i < 16; i ++)
400 {
401 val[i] = (G3DFloat)g3d_stream_read_double_be(global->stream);
402 local->nb -= 8;
403 }
404
405 g_debug("\\%s[Maya][MATR] %s = \n"
406 "%f %f %f %f\n"
407 "%f %f %f %f\n"
408 "%f %f %f %f\n"
409 "%f %f %f %f",
410 padding + (strlen(padding) - local->level),
411 var,
412 val[0 * 4 + 0], val[1 * 4 + 0], val[2 * 4 + 0], val[3 * 4 + 0],
413 val[0 * 4 + 1], val[1 * 4 + 1], val[2 * 4 + 1], val[3 * 4 + 1],
414 val[0 * 4 + 2], val[1 * 4 + 2], val[2 * 4 + 2], val[3 * 4 + 2],
415 val[0 * 4 + 3], val[1 * 4 + 3], val[2 * 4 + 3], val[3 * 4 + 3]);
416
417 if(local->object)
418 maya_var_set((MayaObject *)local->object, var, val);
419 else
420 g_free(val);
421
422 g_free(var);
423
424 return TRUE;
425}
426
427/* mesh */
428gboolean maya_cb_MESH(G3DIffGlobal *global, G3DIffLocal *local)
429{
430 G3DObject *object;
431 G3DMaterial *material;
432 G3DFace *face;
433 gint32 x1, x2, x3, x4, i, i1, i2;
434
435 x1 = g3d_stream_read_int16_be(global->stream);
436 x2 = g3d_stream_read_int16_be(global->stream);
437 x3 = g3d_stream_read_int16_be(global->stream);
438 x4 = g3d_stream_read_int16_be(global->stream);
439 local->nb -= 8;
440
441 object = (G3DObject *)((MayaObject *)local->object)->user_data;
442 material = (G3DMaterial *)g_slist_nth_data(object->materials, 0);
443
444 if(x1 == 0x6369)
445 {
446 object->vertex_count = x4 / 3;
447 object->vertex_data = g_new0(G3DFloat, object->vertex_count * 3);
448
449 for(i = 0; i < object->vertex_count; i ++)
450 {
451 object->vertex_data[i * 3 + 0] = g3d_stream_read_float_be(global->stream);
452 object->vertex_data[i * 3 + 1] = g3d_stream_read_float_be(global->stream);
453 object->vertex_data[i * 3 + 2] = g3d_stream_read_float_be(global->stream);
454 local->nb -= 12;
455 }
456
457 x3 = g3d_stream_read_int16_be(global->stream);
458 x4 = g3d_stream_read_int16_be(global->stream);
459 local->nb -= 4;
460#if 0
461 g_debug("[Maya][MESH] %d %d", x3, x4);
462#endif
463 i1 = -1;
464 i2 = -1;
465 for(i = 0; i < x4 / 2; i ++)
466 {
467 if(i1 == -1)
468 {
469 i1 = g3d_stream_read_int32_be(global->stream) & 0xFFFFFF;
470 i2 = g3d_stream_read_int32_be(global->stream) & 0xFFFFFF;
471 local->nb -= 8;
472 }
473 else
474 {
475 face = g_new0(G3DFace, 1);
476 face->vertex_count = 4;
477 face->vertex_indices = g_new0(guint32, 4);
478 face->vertex_indices[0] = i1;
479 face->vertex_indices[1] = i2;
480 face->vertex_indices[2] =
481 g3d_stream_read_int32_be(global->stream) & 0xFFFFFF;
482 face->vertex_indices[3] =
483 g3d_stream_read_int32_be(global->stream) & 0xFFFFFF;
484 face->material = material;
485 local->nb -= 8;
486 i1 = face->vertex_indices[3];
487 i2 = face->vertex_indices[2];
488
489 object->faces = g_slist_append(object->faces, face);
490 }
491 }
492
493 x3 = g3d_stream_read_int16_be(global->stream);
494 x4 = g3d_stream_read_int16_be(global->stream);
495 local->nb -= 4;
496 }
497 return TRUE;
498}
499
500/* poly cube */
501gboolean maya_cb_PCUB(G3DIffGlobal *global, G3DIffLocal *local)
502{
503 MayaObject *obj;
504 G3DObject *object;
505 G3DMaterial *material;
506 gdouble w, h, d;
507
508 if(local->finalize)
509 {
510 obj = (MayaObject *)local->object;
511 g_return_val_if_fail(obj != NULL, FALSE);
512
513 w = maya_var_get_double(obj, "w", 1.0);
514 h = maya_var_get_double(obj, "h", 1.0);
515 d = maya_var_get_double(obj, "d", 1.0);
516
517 material = g3d_material_new();
518 object = g3d_primitive_box(w, h, d, material);
519 object->name = obj->name ? g_strdup(obj->name) :
520 g_strdup("(unnamed cube)");
521
522 object->materials = g_slist_append(object->materials, material);
523 maya_obj_add_to_tree(obj, global->model, object);
524
525 /* destroy object */
526 maya_obj_free(obj);
527 }
528 else
529 {
530 /* create object */
531 obj = maya_obj_new();
532 local->object = obj;
533 }
534
535 return TRUE;
536}
537
538/* cylinder */
539gboolean maya_cb_PCYL(G3DIffGlobal *global, G3DIffLocal *local)
540{
541 MayaObject *obj;
542 G3DObject *object;
543 G3DMaterial *material;
544 gdouble h, r;
545 guint32 s;
546
547 if(local->finalize) {
548 obj = (MayaObject *)local->object;
549 g_return_val_if_fail(obj != NULL, FALSE);
550
551 h = maya_var_get_double(obj, "h", 1.0);
552 r = maya_var_get_double(obj, "r", 0.5);
553 s = MAX(3, (guint32)maya_var_get_double(obj, "sx", 20));
554
555 material = g3d_material_new();
556 object = g3d_primitive_cylinder(r, h, s, TRUE, TRUE, material);
557 if(object) {
558 object->name = obj->name ? g_strdup(obj->name) :
559 g_strdup("(unnamed cylinder)");
560
561 object->materials = g_slist_append(object->materials, material);
562 maya_obj_add_to_tree(obj, global->model, object);
563 }
564 /* destroy object */
565 maya_obj_free(obj);
566 } else {
567 /* create object */
568 obj = maya_obj_new();
569 local->object = obj;
570 }
571 return TRUE;
572}
573
574/* string */
575gboolean maya_cb_STR_(G3DIffGlobal *global, G3DIffLocal *local)
576{
577 gchar *buffer, *var;
578 gchar *padding = " ";
579
580 /* variable */
581 buffer = g_malloc(local->nb);
582 local->nb -= g3d_stream_read_cstr(global->stream, buffer, local->nb);
583 var = g_strdup(buffer);
584
585 /* value */
586 local->nb -= g3d_stream_read_cstr(global->stream, buffer, local->nb);
587
588 g_debug("\\%s[Maya][STR ] %s = '%.*s' (%d characters)",
589 padding + (strlen(padding) - local->level),
590 var, 40, buffer, (int) strlen(buffer));
591
592 if(local->object)
593 maya_var_set((MayaObject *)local->object, var, g_strdup(buffer));
594
595 g_free(buffer);
596 g_free(var);
597
598 return TRUE;
599}
600
601/* transformation */
602gboolean maya_cb_XFRM(G3DIffGlobal *global, G3DIffLocal *local)
603{
604 MayaObject *obj;
605 G3DObject *object;
606 G3DTransformation *tf;
607 gdouble *val;
608
609 if(local->finalize)
610 {
611 obj = (MayaObject *)local->object;
612
613 object = maya_obj_to_g3d(obj);
614
615 tf = g_new0(G3DTransformation, 1);
616 g3d_matrix_identity(tf->matrix);
617
618 val = maya_var_get(obj, "t");
619 if(val)
620 g3d_matrix_translate(val[0], val[1], val[2], tf->matrix);
621
622 val = maya_var_get(obj, "r");
623 if(val)
624 g3d_matrix_rotate_xyz(val[0], val[1], val[2], tf->matrix);
625
626 val = maya_var_get(obj, "s");
627 if(val)
628 g3d_matrix_scale(val[0], val[1], val[2], tf->matrix);
629
630 /* g3d_matrix_dump(tf->matrix); */
631
632 object->transformation = tf;
633
634 maya_obj_add_to_tree(obj, global->model, object);
635
636 maya_obj_free(obj);
637 }
638 else
639 {
640 obj = maya_obj_new();
641 local->object = obj;
642 }
643
644 return TRUE;
645}
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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_MAYA_CALLBACKS_H
23#define _IMP_MAYA_CALLBACKS_H
24
25#include <g3d/iff.h>
26
27gboolean maya_cb_CMPD(G3DIffGlobal *global, G3DIffLocal *local);
28gboolean maya_cb_CREA(G3DIffGlobal *global, G3DIffLocal *local);
29gboolean maya_cb_CWFL(G3DIffGlobal *global, G3DIffLocal *local);
30gboolean maya_cb_DBLn(G3DIffGlobal *global, G3DIffLocal *local);
31gboolean maya_cb_DBL2(G3DIffGlobal *global, G3DIffLocal *local);
32gboolean maya_cb_DBL3(G3DIffGlobal *global, G3DIffLocal *local);
33gboolean maya_cb_DBLE(G3DIffGlobal *global, G3DIffLocal *local);
34gboolean maya_cb_DMSH(G3DIffGlobal *global, G3DIffLocal *local);
35gboolean maya_cb_FLT3(G3DIffGlobal *global, G3DIffLocal *local);
36gboolean maya_cb_MATR(G3DIffGlobal *global, G3DIffLocal *local);
37gboolean maya_cb_MESH(G3DIffGlobal *global, G3DIffLocal *local);
38gboolean maya_cb_PCUB(G3DIffGlobal *global, G3DIffLocal *local);
39gboolean maya_cb_PCYL(G3DIffGlobal *global, G3DIffLocal *local);
40gboolean maya_cb_STR_(G3DIffGlobal *global, G3DIffLocal *local);
41gboolean maya_cb_XFRM(G3DIffGlobal *global, G3DIffLocal *local);
42
43#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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_MAYA_CHUNKS_H
23#define _IMP_MAYA_CHUNKS_H
24
25#include <g3d/iff.h>
26
27#include "imp_maya_callbacks.h"
28
29static G3DIffChunkInfo maya_chunks[] = {
30 { "ATTR", "unknown", 0, NULL },
31 { "AUDI", "audio", 1, NULL }, /* FOR4 */
32 { "AUNI", "angle unit", 0, NULL },
33 { "BRSH", "brush", 1, NULL }, /* FOR4 */
34 { "CHNG", "changes", 0, NULL },
35 { "CMP#", "unknown", 0, NULL },
36 { "CMPD", "compound", 0, maya_cb_CMPD },
37 { "CONN", "connection list", 1, NULL }, /* FOR4 */
38 { "CONS", "construction", 1, NULL }, /* LIS4 */
39 { "CWFL", "connect attr", 0, maya_cb_CWFL },
40 { "CREA", "create node", 0, maya_cb_CREA },
41 { "DBL#", "double #", 0, maya_cb_DBLn },
42 { "DBL2", "double 2", 0, maya_cb_DBL2 },
43 { "DBL3", "double 3", 0, maya_cb_DBL3 },
44 { "DBLE", "double", 0, maya_cb_DBLE },
45 { "DCAM", "camera", 1, NULL }, /* FOR4 */
46 { "DECT", "delete component", 1, NULL }, /* FOR4 */
47 { "DELA", "delete attribute", 1, NULL }, /* FOR4 */
48 { "DELL", "delete list", 1, NULL }, /* LIS4 */
49 { "DISC", "unknown", 0, NULL },
50 { "DISL", "unknown", 1, NULL }, /* LIS4 */
51 { "DMSH", "mesh", 1, maya_cb_DMSH },
52 { "DMTI", "material info", 1, NULL }, /* FOR4 */
53 { "DPLM", "layer manager", 1, NULL }, /* FOR4 */
54 { "DSPL", "layer ?", 1, NULL }, /* FOR4 */
55 { "FINF", "file information", 0, maya_cb_STR_ },
56 { "FDFL", "flare ?", 1, NULL }, /* FOR4 */
57 { "FLGS", "flags", 0, NULL },
58 { "FLT2", "float 2", 0, NULL },
59 { "FLT3", "float 3", 0, maya_cb_FLT3 },
60 { "FMPT", "unknown", 1, NULL }, /* FOR4 */
61 { "FNLD", "unknown", 1, NULL }, /* FOR4 */
62 { "GPID", "group id", 1, NULL }, /* FOR4 */
63 { "GRPP", "group parts", 1, NULL }, /* FOR4 */
64 { "HEAD", "header", 1, NULL }, /* FOR4 */
65 { "ICON", "icon", 0, NULL },
66 { "INCL", "includes", 0, NULL },
67 { "INFO", "information", 0, NULL },
68 { "LUNI", "length unit", 0, NULL },
69 { "MADE", "creation date", 0, NULL },
70 { "MATR", "matrix", 0, maya_cb_MATR },
71 { "MESH", "mesh", 0, maya_cb_MESH },
72 { "NPLN", "unknown", 0, NULL },
73 { "NRBS", "NURBS ?", 0, NULL },
74 { "NSRF", "surface", 1, NULL }, /* FOR4 */
75 { "OBJN", "unknown", 0, NULL },
76 { "OBST", "unknown", 1, NULL }, /* FOR4 */
77 { "PAUP", "poly auto proj", 1, NULL }, /* FOR4 */
78 { "PBOP", "poly boolean operation", 1, NULL }, /* FOR4 */
79 { "PBVL", "poly bevel", 1, NULL }, /* FOR4 */
80 { "PCRE", "poly create face", 1, NULL }, /* FOR4 */
81 { "PCTA", "poly rotate ?", 1, NULL }, /* FOR4 */
82 { "PCTL", "poly translate ?", 1, NULL }, /* FOR4 */
83 { "PCTU", "poly scale ?", 1, NULL }, /* FOR4 */
84 { "PCUB", "poly cube", 1, maya_cb_PCUB },
85 { "PCYL", "poly cylinder", 1, maya_cb_PCYL },
86 { "PEXE", "poly extrude", 1, NULL }, /* FOR4 */
87 { "PEXF", "poly extrude face", 1, NULL }, /* FOR4 */
88 { "PFUV", "poly flip UV", 1, NULL }, /* FOR4 */
89 { "PING", "unknown", 1, NULL }, /* FOR4 */
90 { "PLUG", "plugin ?", 0, NULL },
91 { "PMIR", "poly mirror", 1, NULL }, /* FOR4 */
92 { "PMVE", "poly merge vertices", 1, NULL }, /* FOR4 */
93 { "PPCT", "poly cut", 1, NULL }, /* FOR4 */
94 { "PPIP", "poly pipe", 1, NULL }, /* FOR4 */
95 { "PRNS", "unknown", 0, NULL },
96 { "PRNT", "unknown", 0, NULL },
97 { "PSEP", "poly separate", 1, NULL }, /* FOR4 */
98 { "PSMF", "poly smooth face", 1, NULL }, /* FOR4 */
99 { "PSOE", "poly soft edge", 1, NULL }, /* FOR4 */
100 { "PSPH", "poly sphere", 1, NULL }, /* FOR4 */
101 { "PSPL", "poly split", 1, NULL }, /* FOR4 */
102 { "PTRI", "poly triangulate", 1, NULL }, /* FOR4 */
103 { "PTUV", "poly tweak UV", 1, NULL }, /* FOR4 */
104 { "PTWK", "poly tweak", 1, NULL }, /* FOR4 */
105 { "PUNI", "poly unite", 1, NULL }, /* FOR4 */
106 { "RANI", "anisotropic", 1, NULL }, /* FOR4 */
107 { "RBLN", "unknown", 1, NULL }, /* FOR4 */
108 { "RLAM", "lambert", 1, NULL }, /* FOR4 */
109 { "RLLK", "light linker", 1, NULL }, /* FOR4 */
110 { "RNDL", "render layer", 1, NULL }, /* FOR4 */
111 { "RNLM", "render layer manager", 1, NULL }, /* FOR4 */
112 { "RPHO", "phong ?", 1, NULL }, /* FOR4 */
113 { "RPL2", "place texture", 1, NULL }, /* FOR4 */
114 { "RPLD", "place texture", 1, NULL }, /* FOR4 */
115 { "RPRJ", "projection", 1, NULL }, /* FOR4 */
116 { "RTFT", "texture file", 1, NULL }, /* FOR4 */
117 { "SCRP", "script", 1, NULL }, /* FOR4 */
118 { "SHAD", "shadow", 1, NULL }, /* FOR4 */
119 { "SLCT", "select", 0, NULL }, /* evil ;) */
120 { "STR ", "string", 0, maya_cb_STR_ },
121 { "TGEO", "transform geometry", 1, NULL }, /* FOR4 */
122 { "TUNI", "time unit", 0, NULL },
123 { "UVER", "minor version?", 0, NULL },
124 { "VERS", "version", 0, NULL },
125 { "XFRM", "transformation", 1, maya_cb_XFRM },
126
127 { NULL, NULL, 0, NULL }
128};
129
130#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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#include <string.h>
23
24#include <g3d/model.h>
25
26#include "imp_maya_obj.h"
27
28MayaObject *maya_obj_new(void)
29{
30 MayaObject *obj;
31
32 obj = g_new0(MayaObject, 1);
33 obj->vars = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
34
35 return obj;
36}
37
38void maya_obj_free(MayaObject *obj)
39{
40 g_hash_table_destroy(obj->vars);
41 if(obj->name) g_free(obj->name);
42 g_free(obj);
43}
44
45G3DObject *maya_obj_to_g3d(MayaObject *obj)
46{
47 G3DObject *object;
48
49 object = g_new0(G3DObject, 1);
50 object->name = obj->name ? g_strdup(obj->name) : "(unnamed)";
51
52 return object;
53}
54
55static G3DObject *get_by_path(G3DModel *model, gchar *path)
56{
57 gchar **parts, **partp;
58 G3DObject *object = NULL;
59 GSList *olist;
60
61 partp = parts = g_strsplit(path, "|", 0);
62 olist = model->objects;
63 while(*partp)
64 {
65 while(olist)
66 {
67 object = (G3DObject *)olist->data;
68
69 if(strcmp(object->name, *partp) == 0) break;
70
71 olist = olist->next;
72 object = NULL;
73 }
74
75 if(object == NULL) return NULL;
76
77 partp ++;
78 olist = object->objects;
79 }
80
81 g_strfreev(parts);
82
83 return object;
84}
85
86gboolean maya_obj_add_to_tree(MayaObject *obj, G3DModel *model,
87 G3DObject *object)
88{
89 G3DObject *parent = NULL;
90
91 if(obj->parent)
92 {
93 if(*(obj->parent) == '|')
94 parent = get_by_path(model, obj->parent + 1);
95 else
96 parent = g3d_model_get_object_by_name(model, obj->parent);
97
98 if(parent == NULL)
99 g_warning(
100 "[Maya] maya_obj_add_to_tree: parent object '%s' not found",
101 obj->parent);
102 }
103
104 if(parent != NULL)
105 parent->objects = g_slist_append(parent->objects, object);
106 else
107 model->objects = g_slist_append(model->objects, object);
108
109 return TRUE;
110}
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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_MAYA_OBJ_H
23#define _IMP_MAYA_OBJ_H
24
25#include <glib.h>
26#include <g3d/types.h>
27
28typedef struct {
29 gchar *name;
30 gchar *parent;
31 GHashTable *vars;
32 gpointer user_data;
33} MayaObject;
34
35MayaObject *maya_obj_new(void);
36void maya_obj_free(MayaObject *obj);
37G3DObject *maya_obj_to_g3d(MayaObject *obj);
38gboolean maya_obj_add_to_tree(MayaObject *obj, G3DModel *model,
39 G3DObject *object);
40
41#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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#include <glib.h>
23
24#include "imp_maya_obj.h"
25
26gboolean maya_var_set(MayaObject *obj, const gchar *var, gpointer value)
27{
28 g_hash_table_replace(obj->vars, g_strdup(var), value);
29
30 return TRUE;
31}
32
33gpointer maya_var_get(MayaObject *obj, const gchar *var)
34{
35 gpointer val;
36
37 val = g_hash_table_lookup(obj->vars, var);
38 return val;
39}
40
41gboolean maya_var_set_double(MayaObject *obj, const gchar *var, gdouble value)
42{
43 gdouble *pval;
44
45 pval = g_new0(gdouble, 1);
46 *pval = value;
47
48 return maya_var_set(obj, var, pval);
49}
50
51gdouble maya_var_get_double(MayaObject *obj, const gchar *var, gdouble defval)
52{
53 gdouble *pval;
54
55 pval = maya_var_get(obj, var);
56 if(pval == NULL)
57 return defval;
58
59 return *pval;
60}
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 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_MAYA_VAR_H
23#define _IMP_MAYA_VAR_H
24
25#include "imp_maya_obj.h"
26
27gboolean maya_var_set(MayaObject *obj, const gchar *var, gpointer value);
28gpointer maya_var_get(MayaObject *obj, const gchar *var);
29
30gboolean maya_var_set_double(MayaObject *obj, const gchar *var, gdouble value);
31gdouble maya_var_get_double(MayaObject *obj, const gchar *var, gdouble defval);
32
33#endif /* _IMP_MAYA_VAR_H */