diff options
author | David Walter Seikel | 2016-03-29 02:16:55 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-03-29 02:16:55 +1000 |
commit | cb3716ffb584fe0f593b6f1669a8efdba1305104 (patch) | |
tree | 5d1ebc4b6fc17b30f4b34e7e64a2d9514893459b /src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya | |
parent | Add Prosody build script. (diff) | |
download | SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.zip SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.gz SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.bz2 SledjHamr-cb3716ffb584fe0f593b6f1669a8efdba1305104.tar.xz |
Added my version of libg3d and friends.
Diffstat (limited to 'src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya')
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 | |||
18 | pkgdatadir = $(datadir)/libg3d | ||
19 | pkglibdir = $(libdir)/libg3d | ||
20 | pkgincludedir = $(includedir)/libg3d | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = x86_64-unknown-linux-gnu | ||
34 | host_triplet = x86_64-unknown-linux-gnu | ||
35 | subdir = plugins/import/imp_maya | ||
36 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
37 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
38 | am__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 | ||
43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
44 | $(ACLOCAL_M4) | ||
45 | mkinstalldirs = $(install_sh) -d | ||
46 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
47 | CONFIG_CLEAN_FILES = | ||
48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
49 | am__vpath_adj = case $$p in \ | ||
50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
51 | *) f=$$p;; \ | ||
52 | esac; | ||
53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
54 | am__installdirs = "$(DESTDIR)$(pluginimpdir)" | ||
55 | pluginimpLTLIBRARIES_INSTALL = $(INSTALL) | ||
56 | LTLIBRARIES = $(pluginimp_LTLIBRARIES) | ||
57 | imp_maya_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_maya_la_OBJECTS = imp_maya.lo imp_maya_callbacks.lo \ | ||
59 | imp_maya_obj.lo imp_maya_var.lo | ||
60 | imp_maya_la_OBJECTS = $(am_imp_maya_la_OBJECTS) | ||
61 | #am_imp_maya_la_rpath = -rpath $(pluginimpdir) | ||
62 | DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d | ||
63 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
64 | am__depfiles_maybe = depfiles | ||
65 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
66 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
67 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
68 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
69 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
70 | CCLD = $(CC) | ||
71 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
72 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
73 | $(LDFLAGS) -o $@ | ||
74 | SOURCES = $(imp_maya_la_SOURCES) | ||
75 | DIST_SOURCES = $(imp_maya_la_SOURCES) | ||
76 | ETAGS = etags | ||
77 | CTAGS = ctags | ||
78 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
79 | ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10 | ||
80 | AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar | ||
81 | AR = ar | ||
82 | AS = as | ||
83 | AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf | ||
84 | AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader | ||
85 | AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10 | ||
86 | AWK = gawk | ||
87 | CC = gcc | ||
88 | CCDEPMODE = depmode=gcc3 | ||
89 | CFLAGS = -g -O2 | ||
90 | CPP = gcc -E | ||
91 | CPPFLAGS = | ||
92 | CXX = g++ | ||
93 | CXXCPP = g++ -E | ||
94 | CXXDEPMODE = depmode=gcc3 | ||
95 | CXXFLAGS = -g -O2 | ||
96 | CYGPATH_W = echo | ||
97 | DBG_CFLAGS = -O2 | ||
98 | DEBUG = 0 | ||
99 | DEFS = -DHAVE_CONFIG_H | ||
100 | DEPDIR = .deps | ||
101 | DLLTOOL = dlltool | ||
102 | ECHO = echo | ||
103 | ECHO_C = | ||
104 | ECHO_N = -n | ||
105 | ECHO_T = | ||
106 | EGREP = /bin/grep -E | ||
107 | EXEEXT = | ||
108 | F77 = | ||
109 | FFLAGS = | ||
110 | 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 | ||
111 | 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 | ||
112 | GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include | ||
113 | GLIB_GENMARSHAL = glib-genmarshal | ||
114 | GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
115 | GLIB_MKENUMS = glib-mkenums | ||
116 | GOBJECT_QUERY = gobject-query | ||
117 | GREP = /bin/grep | ||
118 | GTKDOC_CHECK = /usr/bin/gtkdoc-check | ||
119 | 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 | ||
120 | 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 | ||
121 | HTML_DIR = ${datadir}/gtk-doc/html | ||
122 | INSTALL = /usr/bin/install -c | ||
123 | INSTALL_DATA = ${INSTALL} -m 644 | ||
124 | INSTALL_PROGRAM = ${INSTALL} | ||
125 | INSTALL_SCRIPT = ${INSTALL} | ||
126 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s | ||
127 | LDFLAGS = | ||
128 | LEX = flex | ||
129 | LEXLIB = -lfl | ||
130 | LEX_OUTPUT_ROOT = lex.yy | ||
131 | 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 | ||
132 | LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0 | ||
133 | LIBOBJS = | ||
134 | LIBS = -lm | ||
135 | LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet | ||
136 | LIBXML2_CFLAGS = -I/usr/include/libxml2 | ||
137 | LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
138 | LN_S = ln -s | ||
139 | LTLIBOBJS = | ||
140 | LTVERSION = 0:8:0 | ||
141 | MAGIC_LIBS = -lmagic | ||
142 | MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo | ||
143 | MATH_LIBS = -lm | ||
144 | MKDIR_P = /bin/mkdir -p | ||
145 | OBJDUMP = objdump | ||
146 | OBJEXT = o | ||
147 | PACKAGE = libg3d | ||
148 | PACKAGE_BUGREPORT = | ||
149 | PACKAGE_NAME = | ||
150 | PACKAGE_STRING = | ||
151 | PACKAGE_TARNAME = | ||
152 | PACKAGE_VERSION = | ||
153 | PATH_SEPARATOR = : | ||
154 | PKG_CONFIG = /usr/bin/pkg-config | ||
155 | PLUGINS_LDFLAGS = -avoid-version -export-dynamic | ||
156 | RANLIB = ranlib | ||
157 | SET_MAKE = | ||
158 | SHELL = /bin/bash | ||
159 | STRIP = strip | ||
160 | VERSION = 0.0.8 | ||
161 | XML2_CONFIG = /usr/bin/xml2-config | ||
162 | XML_CPPFLAGS = -I/usr/include/libxml2 | ||
163 | XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2 | ||
164 | Z_CFLAGS = | ||
165 | Z_LIBS = -lz | ||
166 | abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya | ||
167 | abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_maya | ||
168 | abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
169 | abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8 | ||
170 | ac_ct_CC = gcc | ||
171 | ac_ct_CXX = g++ | ||
172 | ac_ct_F77 = | ||
173 | am__include = include | ||
174 | am__leading_dot = . | ||
175 | am__quote = | ||
176 | am__tar = ${AMTAR} chof - "$$tardir" | ||
177 | am__untar = ${AMTAR} xf - | ||
178 | bindir = ${exec_prefix}/bin | ||
179 | build = x86_64-unknown-linux-gnu | ||
180 | build_alias = | ||
181 | build_cpu = x86_64 | ||
182 | build_os = linux-gnu | ||
183 | build_vendor = unknown | ||
184 | builddir = . | ||
185 | datadir = ${datarootdir} | ||
186 | datarootdir = ${prefix}/share | ||
187 | docdir = ${datarootdir}/doc/${PACKAGE} | ||
188 | dvidir = ${docdir} | ||
189 | exec_prefix = ${prefix} | ||
190 | host = x86_64-unknown-linux-gnu | ||
191 | host_alias = | ||
192 | host_cpu = x86_64 | ||
193 | host_os = linux-gnu | ||
194 | host_vendor = unknown | ||
195 | htmldir = ${docdir} | ||
196 | includedir = ${prefix}/include | ||
197 | infodir = ${datarootdir}/info | ||
198 | install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh | ||
199 | libdir = ${exec_prefix}/lib | ||
200 | libexecdir = ${exec_prefix}/libexec | ||
201 | localedir = ${datarootdir}/locale | ||
202 | localstatedir = ${prefix}/var | ||
203 | mandir = ${datarootdir}/man | ||
204 | mkdir_p = /bin/mkdir -p | ||
205 | oldincludedir = /usr/include | ||
206 | pdfdir = ${docdir} | ||
207 | prefix = /usr/local | ||
208 | program_transform_name = s,x,x, | ||
209 | psdir = ${docdir} | ||
210 | sbindir = ${exec_prefix}/sbin | ||
211 | sharedstatedir = ${prefix}/com | ||
212 | srcdir = . | ||
213 | sysconfdir = ${prefix}/etc | ||
214 | target_alias = | ||
215 | top_builddir = ../../.. | ||
216 | top_srcdir = ../../.. | ||
217 | pluginimpdir = $(pkglibdir)/plugins/import | ||
218 | #pluginimp_LTLIBRARIES = imp_maya.la | ||
219 | AM_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 | |||
225 | INCLUDES = -I$(top_srcdir)/include | ||
226 | AM_LDFLAGS = \ | ||
227 | -no-undefined -module \ | ||
228 | -avoid-version -export-dynamic | ||
229 | |||
230 | imp_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 | |||
235 | imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
236 | all: 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 | ||
253 | Makefile: $(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 | ||
269 | install-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 | |||
280 | uninstall-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 | |||
288 | clean-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 | ||
296 | imp_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 | |||
299 | mostlyclean-compile: | ||
300 | -rm -f *.$(OBJEXT) | ||
301 | |||
302 | distclean-compile: | ||
303 | -rm -f *.tab.c | ||
304 | |||
305 | include ./$(DEPDIR)/imp_maya.Plo | ||
306 | include ./$(DEPDIR)/imp_maya_callbacks.Plo | ||
307 | include ./$(DEPDIR)/imp_maya_obj.Plo | ||
308 | include ./$(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 | |||
331 | mostlyclean-libtool: | ||
332 | -rm -f *.lo | ||
333 | |||
334 | clean-libtool: | ||
335 | -rm -rf .libs _libs | ||
336 | |||
337 | ID: $(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 | ||
345 | tags: TAGS | ||
346 | |||
347 | TAGS: $(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 | ||
362 | ctags: CTAGS | ||
363 | CTAGS: $(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 | |||
376 | GTAGS: | ||
377 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
378 | && cd $(top_srcdir) \ | ||
379 | && gtags -i $(GTAGS_ARGS) $$here | ||
380 | |||
381 | distclean-tags: | ||
382 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
383 | |||
384 | distdir: $(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 | ||
410 | check-am: all-am | ||
411 | check: check-am | ||
412 | all-am: Makefile $(LTLIBRARIES) | ||
413 | installdirs: | ||
414 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
415 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
416 | done | ||
417 | install: install-am | ||
418 | install-exec: install-exec-am | ||
419 | install-data: install-data-am | ||
420 | uninstall: uninstall-am | ||
421 | |||
422 | install-am: all-am | ||
423 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
424 | |||
425 | installcheck: installcheck-am | ||
426 | install-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 | ||
431 | mostlyclean-generic: | ||
432 | |||
433 | clean-generic: | ||
434 | |||
435 | distclean-generic: | ||
436 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
437 | |||
438 | maintainer-clean-generic: | ||
439 | @echo "This command is intended for maintainers to use" | ||
440 | @echo "it deletes files that may require special tools to rebuild." | ||
441 | clean: clean-am | ||
442 | |||
443 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
444 | mostlyclean-am | ||
445 | |||
446 | distclean: distclean-am | ||
447 | -rm -rf ./$(DEPDIR) | ||
448 | -rm -f Makefile | ||
449 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
450 | distclean-tags | ||
451 | |||
452 | dvi: dvi-am | ||
453 | |||
454 | dvi-am: | ||
455 | |||
456 | html: html-am | ||
457 | |||
458 | info: info-am | ||
459 | |||
460 | info-am: | ||
461 | |||
462 | install-data-am: install-pluginimpLTLIBRARIES | ||
463 | |||
464 | install-dvi: install-dvi-am | ||
465 | |||
466 | install-exec-am: | ||
467 | |||
468 | install-html: install-html-am | ||
469 | |||
470 | install-info: install-info-am | ||
471 | |||
472 | install-man: | ||
473 | |||
474 | install-pdf: install-pdf-am | ||
475 | |||
476 | install-ps: install-ps-am | ||
477 | |||
478 | installcheck-am: | ||
479 | |||
480 | maintainer-clean: maintainer-clean-am | ||
481 | -rm -rf ./$(DEPDIR) | ||
482 | -rm -f Makefile | ||
483 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
484 | |||
485 | mostlyclean: mostlyclean-am | ||
486 | |||
487 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
488 | mostlyclean-libtool | ||
489 | |||
490 | pdf: pdf-am | ||
491 | |||
492 | pdf-am: | ||
493 | |||
494 | ps: ps-am | ||
495 | |||
496 | ps-am: | ||
497 | |||
498 | uninstall-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 @@ | |||
1 | pluginimpdir = $(pkglibdir)/plugins/import | ||
2 | |||
3 | if EXPERIMENTAL | ||
4 | pluginimp_LTLIBRARIES = imp_maya.la | ||
5 | endif | ||
6 | |||
7 | AM_CFLAGS = \ | ||
8 | -Wall -ansi -pedantic \ | ||
9 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
10 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
11 | @GLIB_CFLAGS@ | ||
12 | |||
13 | INCLUDES = -I$(top_srcdir)/include | ||
14 | |||
15 | AM_LDFLAGS = \ | ||
16 | -no-undefined -module \ | ||
17 | @PLUGINS_LDFLAGS@ | ||
18 | |||
19 | LIBTOOL += --quiet | ||
20 | |||
21 | imp_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 | ||
25 | 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 @@ | |||
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 | |||
17 | VPATH = @srcdir@ | ||
18 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
19 | pkglibdir = $(libdir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
22 | install_sh_DATA = $(install_sh) -c -m 644 | ||
23 | install_sh_PROGRAM = $(install_sh) -c | ||
24 | install_sh_SCRIPT = $(install_sh) -c | ||
25 | INSTALL_HEADER = $(INSTALL_DATA) | ||
26 | transform = $(program_transform_name) | ||
27 | NORMAL_INSTALL = : | ||
28 | PRE_INSTALL = : | ||
29 | POST_INSTALL = : | ||
30 | NORMAL_UNINSTALL = : | ||
31 | PRE_UNINSTALL = : | ||
32 | POST_UNINSTALL = : | ||
33 | build_triplet = @build@ | ||
34 | host_triplet = @host@ | ||
35 | subdir = plugins/import/imp_maya | ||
36 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
37 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
38 | am__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 | ||
43 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
44 | $(ACLOCAL_M4) | ||
45 | mkinstalldirs = $(install_sh) -d | ||
46 | CONFIG_HEADER = $(top_builddir)/include/g3d/config.h | ||
47 | CONFIG_CLEAN_FILES = | ||
48 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
49 | am__vpath_adj = case $$p in \ | ||
50 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
51 | *) f=$$p;; \ | ||
52 | esac; | ||
53 | am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; | ||
54 | am__installdirs = "$(DESTDIR)$(pluginimpdir)" | ||
55 | pluginimpLTLIBRARIES_INSTALL = $(INSTALL) | ||
56 | LTLIBRARIES = $(pluginimp_LTLIBRARIES) | ||
57 | imp_maya_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_maya_la_OBJECTS = imp_maya.lo imp_maya_callbacks.lo \ | ||
59 | imp_maya_obj.lo imp_maya_var.lo | ||
60 | imp_maya_la_OBJECTS = $(am_imp_maya_la_OBJECTS) | ||
61 | @EXPERIMENTAL_TRUE@am_imp_maya_la_rpath = -rpath $(pluginimpdir) | ||
62 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d | ||
63 | depcomp = $(SHELL) $(top_srcdir)/config/depcomp | ||
64 | am__depfiles_maybe = depfiles | ||
65 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
66 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
67 | LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
68 | --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
69 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
70 | CCLD = $(CC) | ||
71 | LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ | ||
72 | --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ | ||
73 | $(LDFLAGS) -o $@ | ||
74 | SOURCES = $(imp_maya_la_SOURCES) | ||
75 | DIST_SOURCES = $(imp_maya_la_SOURCES) | ||
76 | ETAGS = etags | ||
77 | CTAGS = ctags | ||
78 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
79 | ACLOCAL = @ACLOCAL@ | ||
80 | AMTAR = @AMTAR@ | ||
81 | AR = @AR@ | ||
82 | AS = @AS@ | ||
83 | AUTOCONF = @AUTOCONF@ | ||
84 | AUTOHEADER = @AUTOHEADER@ | ||
85 | AUTOMAKE = @AUTOMAKE@ | ||
86 | AWK = @AWK@ | ||
87 | CC = @CC@ | ||
88 | CCDEPMODE = @CCDEPMODE@ | ||
89 | CFLAGS = @CFLAGS@ | ||
90 | CPP = @CPP@ | ||
91 | CPPFLAGS = @CPPFLAGS@ | ||
92 | CXX = @CXX@ | ||
93 | CXXCPP = @CXXCPP@ | ||
94 | CXXDEPMODE = @CXXDEPMODE@ | ||
95 | CXXFLAGS = @CXXFLAGS@ | ||
96 | CYGPATH_W = @CYGPATH_W@ | ||
97 | DBG_CFLAGS = @DBG_CFLAGS@ | ||
98 | DEBUG = @DEBUG@ | ||
99 | DEFS = @DEFS@ | ||
100 | DEPDIR = @DEPDIR@ | ||
101 | DLLTOOL = @DLLTOOL@ | ||
102 | ECHO = @ECHO@ | ||
103 | ECHO_C = @ECHO_C@ | ||
104 | ECHO_N = @ECHO_N@ | ||
105 | ECHO_T = @ECHO_T@ | ||
106 | EGREP = @EGREP@ | ||
107 | EXEEXT = @EXEEXT@ | ||
108 | F77 = @F77@ | ||
109 | FFLAGS = @FFLAGS@ | ||
110 | GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@ | ||
111 | GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@ | ||
112 | GLIB_CFLAGS = @GLIB_CFLAGS@ | ||
113 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ | ||
114 | GLIB_LIBS = @GLIB_LIBS@ | ||
115 | GLIB_MKENUMS = @GLIB_MKENUMS@ | ||
116 | GOBJECT_QUERY = @GOBJECT_QUERY@ | ||
117 | GREP = @GREP@ | ||
118 | GTKDOC_CHECK = @GTKDOC_CHECK@ | ||
119 | GTK_CFLAGS = @GTK_CFLAGS@ | ||
120 | GTK_LIBS = @GTK_LIBS@ | ||
121 | HTML_DIR = @HTML_DIR@ | ||
122 | INSTALL = @INSTALL@ | ||
123 | INSTALL_DATA = @INSTALL_DATA@ | ||
124 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
125 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
126 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
127 | LDFLAGS = @LDFLAGS@ | ||
128 | LEX = @LEX@ | ||
129 | LEXLIB = @LEXLIB@ | ||
130 | LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ | ||
131 | LIBGSF_CFLAGS = @LIBGSF_CFLAGS@ | ||
132 | LIBGSF_LIBS = @LIBGSF_LIBS@ | ||
133 | LIBOBJS = @LIBOBJS@ | ||
134 | LIBS = @LIBS@ | ||
135 | LIBTOOL = @LIBTOOL@ --quiet | ||
136 | LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ | ||
137 | LIBXML2_LIBS = @LIBXML2_LIBS@ | ||
138 | LN_S = @LN_S@ | ||
139 | LTLIBOBJS = @LTLIBOBJS@ | ||
140 | LTVERSION = @LTVERSION@ | ||
141 | MAGIC_LIBS = @MAGIC_LIBS@ | ||
142 | MAKEINFO = @MAKEINFO@ | ||
143 | MATH_LIBS = @MATH_LIBS@ | ||
144 | MKDIR_P = @MKDIR_P@ | ||
145 | OBJDUMP = @OBJDUMP@ | ||
146 | OBJEXT = @OBJEXT@ | ||
147 | PACKAGE = @PACKAGE@ | ||
148 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
149 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
150 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
151 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
152 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
153 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
154 | PKG_CONFIG = @PKG_CONFIG@ | ||
155 | PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@ | ||
156 | RANLIB = @RANLIB@ | ||
157 | SET_MAKE = @SET_MAKE@ | ||
158 | SHELL = @SHELL@ | ||
159 | STRIP = @STRIP@ | ||
160 | VERSION = @VERSION@ | ||
161 | XML2_CONFIG = @XML2_CONFIG@ | ||
162 | XML_CPPFLAGS = @XML_CPPFLAGS@ | ||
163 | XML_LIBS = @XML_LIBS@ | ||
164 | Z_CFLAGS = @Z_CFLAGS@ | ||
165 | Z_LIBS = @Z_LIBS@ | ||
166 | abs_builddir = @abs_builddir@ | ||
167 | abs_srcdir = @abs_srcdir@ | ||
168 | abs_top_builddir = @abs_top_builddir@ | ||
169 | abs_top_srcdir = @abs_top_srcdir@ | ||
170 | ac_ct_CC = @ac_ct_CC@ | ||
171 | ac_ct_CXX = @ac_ct_CXX@ | ||
172 | ac_ct_F77 = @ac_ct_F77@ | ||
173 | am__include = @am__include@ | ||
174 | am__leading_dot = @am__leading_dot@ | ||
175 | am__quote = @am__quote@ | ||
176 | am__tar = @am__tar@ | ||
177 | am__untar = @am__untar@ | ||
178 | bindir = @bindir@ | ||
179 | build = @build@ | ||
180 | build_alias = @build_alias@ | ||
181 | build_cpu = @build_cpu@ | ||
182 | build_os = @build_os@ | ||
183 | build_vendor = @build_vendor@ | ||
184 | builddir = @builddir@ | ||
185 | datadir = @datadir@ | ||
186 | datarootdir = @datarootdir@ | ||
187 | docdir = @docdir@ | ||
188 | dvidir = @dvidir@ | ||
189 | exec_prefix = @exec_prefix@ | ||
190 | host = @host@ | ||
191 | host_alias = @host_alias@ | ||
192 | host_cpu = @host_cpu@ | ||
193 | host_os = @host_os@ | ||
194 | host_vendor = @host_vendor@ | ||
195 | htmldir = @htmldir@ | ||
196 | includedir = @includedir@ | ||
197 | infodir = @infodir@ | ||
198 | install_sh = @install_sh@ | ||
199 | libdir = @libdir@ | ||
200 | libexecdir = @libexecdir@ | ||
201 | localedir = @localedir@ | ||
202 | localstatedir = @localstatedir@ | ||
203 | mandir = @mandir@ | ||
204 | mkdir_p = @mkdir_p@ | ||
205 | oldincludedir = @oldincludedir@ | ||
206 | pdfdir = @pdfdir@ | ||
207 | prefix = @prefix@ | ||
208 | program_transform_name = @program_transform_name@ | ||
209 | psdir = @psdir@ | ||
210 | sbindir = @sbindir@ | ||
211 | sharedstatedir = @sharedstatedir@ | ||
212 | srcdir = @srcdir@ | ||
213 | sysconfdir = @sysconfdir@ | ||
214 | target_alias = @target_alias@ | ||
215 | top_builddir = @top_builddir@ | ||
216 | top_srcdir = @top_srcdir@ | ||
217 | pluginimpdir = $(pkglibdir)/plugins/import | ||
218 | @EXPERIMENTAL_TRUE@pluginimp_LTLIBRARIES = imp_maya.la | ||
219 | AM_CFLAGS = \ | ||
220 | -Wall -ansi -pedantic \ | ||
221 | -DG_LOG_DOMAIN=\"LibG3D\" \ | ||
222 | @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \ | ||
223 | @GLIB_CFLAGS@ | ||
224 | |||
225 | INCLUDES = -I$(top_srcdir)/include | ||
226 | AM_LDFLAGS = \ | ||
227 | -no-undefined -module \ | ||
228 | @PLUGINS_LDFLAGS@ | ||
229 | |||
230 | imp_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 | |||
235 | imp_maya_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
236 | all: 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 | ||
253 | Makefile: $(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 | ||
269 | install-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 | |||
280 | uninstall-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 | |||
288 | clean-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 | ||
296 | imp_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 | |||
299 | mostlyclean-compile: | ||
300 | -rm -f *.$(OBJEXT) | ||
301 | |||
302 | distclean-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 | |||
331 | mostlyclean-libtool: | ||
332 | -rm -f *.lo | ||
333 | |||
334 | clean-libtool: | ||
335 | -rm -rf .libs _libs | ||
336 | |||
337 | ID: $(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 | ||
345 | tags: TAGS | ||
346 | |||
347 | TAGS: $(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 | ||
362 | ctags: CTAGS | ||
363 | CTAGS: $(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 | |||
376 | GTAGS: | ||
377 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
378 | && cd $(top_srcdir) \ | ||
379 | && gtags -i $(GTAGS_ARGS) $$here | ||
380 | |||
381 | distclean-tags: | ||
382 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
383 | |||
384 | distdir: $(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 | ||
410 | check-am: all-am | ||
411 | check: check-am | ||
412 | all-am: Makefile $(LTLIBRARIES) | ||
413 | installdirs: | ||
414 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
415 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
416 | done | ||
417 | install: install-am | ||
418 | install-exec: install-exec-am | ||
419 | install-data: install-data-am | ||
420 | uninstall: uninstall-am | ||
421 | |||
422 | install-am: all-am | ||
423 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
424 | |||
425 | installcheck: installcheck-am | ||
426 | install-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 | ||
431 | mostlyclean-generic: | ||
432 | |||
433 | clean-generic: | ||
434 | |||
435 | distclean-generic: | ||
436 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
437 | |||
438 | maintainer-clean-generic: | ||
439 | @echo "This command is intended for maintainers to use" | ||
440 | @echo "it deletes files that may require special tools to rebuild." | ||
441 | clean: clean-am | ||
442 | |||
443 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
444 | mostlyclean-am | ||
445 | |||
446 | distclean: distclean-am | ||
447 | -rm -rf ./$(DEPDIR) | ||
448 | -rm -f Makefile | ||
449 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
450 | distclean-tags | ||
451 | |||
452 | dvi: dvi-am | ||
453 | |||
454 | dvi-am: | ||
455 | |||
456 | html: html-am | ||
457 | |||
458 | info: info-am | ||
459 | |||
460 | info-am: | ||
461 | |||
462 | install-data-am: install-pluginimpLTLIBRARIES | ||
463 | |||
464 | install-dvi: install-dvi-am | ||
465 | |||
466 | install-exec-am: | ||
467 | |||
468 | install-html: install-html-am | ||
469 | |||
470 | install-info: install-info-am | ||
471 | |||
472 | install-man: | ||
473 | |||
474 | install-pdf: install-pdf-am | ||
475 | |||
476 | install-ps: install-ps-am | ||
477 | |||
478 | installcheck-am: | ||
479 | |||
480 | maintainer-clean: maintainer-clean-am | ||
481 | -rm -rf ./$(DEPDIR) | ||
482 | -rm -f Makefile | ||
483 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
484 | |||
485 | mostlyclean: mostlyclean-am | ||
486 | |||
487 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
488 | mostlyclean-libtool | ||
489 | |||
490 | pdf: pdf-am | ||
491 | |||
492 | pdf-am: | ||
493 | |||
494 | ps: ps-am | ||
495 | |||
496 | ps-am: | ||
497 | |||
498 | uninstall-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 | |||
33 | EAPI | ||
34 | gboolean 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 | |||
66 | EAPI | ||
67 | gchar *plugin_description(void) | ||
68 | { | ||
69 | return g_strdup("Maya models."); | ||
70 | } | ||
71 | |||
72 | EAPI | ||
73 | gchar **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? */ | ||
36 | gboolean 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 */ | ||
82 | gboolean 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 | |||
123 | gboolean 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 # */ | ||
152 | gboolean 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 */ | ||
190 | gboolean 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 */ | ||
225 | gboolean 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 */ | ||
261 | gboolean 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 */ | ||
298 | gboolean 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 */ | ||
339 | gboolean 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 */ | ||
375 | gboolean 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 */ | ||
428 | gboolean 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 */ | ||
501 | gboolean 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 */ | ||
539 | gboolean 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 */ | ||
575 | gboolean 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 */ | ||
602 | gboolean 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 | |||
27 | gboolean maya_cb_CMPD(G3DIffGlobal *global, G3DIffLocal *local); | ||
28 | gboolean maya_cb_CREA(G3DIffGlobal *global, G3DIffLocal *local); | ||
29 | gboolean maya_cb_CWFL(G3DIffGlobal *global, G3DIffLocal *local); | ||
30 | gboolean maya_cb_DBLn(G3DIffGlobal *global, G3DIffLocal *local); | ||
31 | gboolean maya_cb_DBL2(G3DIffGlobal *global, G3DIffLocal *local); | ||
32 | gboolean maya_cb_DBL3(G3DIffGlobal *global, G3DIffLocal *local); | ||
33 | gboolean maya_cb_DBLE(G3DIffGlobal *global, G3DIffLocal *local); | ||
34 | gboolean maya_cb_DMSH(G3DIffGlobal *global, G3DIffLocal *local); | ||
35 | gboolean maya_cb_FLT3(G3DIffGlobal *global, G3DIffLocal *local); | ||
36 | gboolean maya_cb_MATR(G3DIffGlobal *global, G3DIffLocal *local); | ||
37 | gboolean maya_cb_MESH(G3DIffGlobal *global, G3DIffLocal *local); | ||
38 | gboolean maya_cb_PCUB(G3DIffGlobal *global, G3DIffLocal *local); | ||
39 | gboolean maya_cb_PCYL(G3DIffGlobal *global, G3DIffLocal *local); | ||
40 | gboolean maya_cb_STR_(G3DIffGlobal *global, G3DIffLocal *local); | ||
41 | gboolean 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 | |||
29 | static 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 | |||
28 | MayaObject *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 | |||
38 | void 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 | |||
45 | G3DObject *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 | |||
55 | static 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 | |||
86 | gboolean 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 | |||
28 | typedef struct { | ||
29 | gchar *name; | ||
30 | gchar *parent; | ||
31 | GHashTable *vars; | ||
32 | gpointer user_data; | ||
33 | } MayaObject; | ||
34 | |||
35 | MayaObject *maya_obj_new(void); | ||
36 | void maya_obj_free(MayaObject *obj); | ||
37 | G3DObject *maya_obj_to_g3d(MayaObject *obj); | ||
38 | gboolean 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 | |||
26 | gboolean 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 | |||
33 | gpointer 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 | |||
41 | gboolean 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 | |||
51 | gdouble 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 | |||
27 | gboolean maya_var_set(MayaObject *obj, const gchar *var, gpointer value); | ||
28 | gpointer maya_var_get(MayaObject *obj, const gchar *var); | ||
29 | |||
30 | gboolean maya_var_set_double(MayaObject *obj, const gchar *var, gdouble value); | ||
31 | gdouble maya_var_get_double(MayaObject *obj, const gchar *var, gdouble defval); | ||
32 | |||
33 | #endif /* _IMP_MAYA_VAR_H */ | ||