diff options
Diffstat (limited to '')
13 files changed, 2331 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile new file mode 100644 index 0000000..a07f936 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile | |||
@@ -0,0 +1,519 @@ | |||
1 | # Makefile.in generated by automake 1.10.1 from Makefile.am. | ||
2 | # plugins/import/imp_blend/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_blend | ||
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_blend_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_blend_la_OBJECTS = imp_blend.lo imp_blend_sdna.lo \ | ||
59 | imp_blend_read.lo imp_blend_callbacks.lo | ||
60 | imp_blend_la_OBJECTS = $(am_imp_blend_la_OBJECTS) | ||
61 | #am_imp_blend_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_blend_la_SOURCES) | ||
75 | DIST_SOURCES = $(imp_blend_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_blend | ||
167 | abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend | ||
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_blend.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_blend_la_SOURCES = imp_blend.c imp_blend_def.h \ | ||
231 | imp_blend_types.h imp_blend_chunks.h \ | ||
232 | imp_blend_sdna.c imp_blend_sdna.h \ | ||
233 | imp_blend_read.c imp_blend_read.h \ | ||
234 | imp_blend_callbacks.h imp_blend_callbacks.c | ||
235 | |||
236 | imp_blend_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 | ||
237 | all: all-am | ||
238 | |||
239 | .SUFFIXES: | ||
240 | .SUFFIXES: .c .lo .o .obj | ||
241 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
242 | @for dep in $?; do \ | ||
243 | case '$(am__configure_deps)' in \ | ||
244 | *$$dep*) \ | ||
245 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
246 | && exit 0; \ | ||
247 | exit 1;; \ | ||
248 | esac; \ | ||
249 | done; \ | ||
250 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_blend/Makefile'; \ | ||
251 | cd $(top_srcdir) && \ | ||
252 | $(AUTOMAKE) --gnu plugins/import/imp_blend/Makefile | ||
253 | .PRECIOUS: Makefile | ||
254 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
255 | @case '$?' in \ | ||
256 | *config.status*) \ | ||
257 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
258 | *) \ | ||
259 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
260 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
261 | esac; | ||
262 | |||
263 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
264 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
265 | |||
266 | $(top_srcdir)/configure: $(am__configure_deps) | ||
267 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
268 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
269 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
270 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
271 | @$(NORMAL_INSTALL) | ||
272 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
273 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
274 | if test -f $$p; then \ | ||
275 | f=$(am__strip_dir) \ | ||
276 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
277 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
278 | else :; fi; \ | ||
279 | done | ||
280 | |||
281 | uninstall-pluginimpLTLIBRARIES: | ||
282 | @$(NORMAL_UNINSTALL) | ||
283 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
284 | p=$(am__strip_dir) \ | ||
285 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
286 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
287 | done | ||
288 | |||
289 | clean-pluginimpLTLIBRARIES: | ||
290 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
291 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
292 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
293 | test "$$dir" != "$$p" || dir=.; \ | ||
294 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
295 | rm -f "$${dir}/so_locations"; \ | ||
296 | done | ||
297 | imp_blend.la: $(imp_blend_la_OBJECTS) $(imp_blend_la_DEPENDENCIES) | ||
298 | $(LINK) $(am_imp_blend_la_rpath) $(imp_blend_la_OBJECTS) $(imp_blend_la_LIBADD) $(LIBS) | ||
299 | |||
300 | mostlyclean-compile: | ||
301 | -rm -f *.$(OBJEXT) | ||
302 | |||
303 | distclean-compile: | ||
304 | -rm -f *.tab.c | ||
305 | |||
306 | include ./$(DEPDIR)/imp_blend.Plo | ||
307 | include ./$(DEPDIR)/imp_blend_callbacks.Plo | ||
308 | include ./$(DEPDIR)/imp_blend_read.Plo | ||
309 | include ./$(DEPDIR)/imp_blend_sdna.Plo | ||
310 | |||
311 | .c.o: | ||
312 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
313 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | # source='$<' object='$@' libtool=no \ | ||
315 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
316 | # $(COMPILE) -c $< | ||
317 | |||
318 | .c.obj: | ||
319 | $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
320 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
321 | # source='$<' object='$@' libtool=no \ | ||
322 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
323 | # $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
324 | |||
325 | .c.lo: | ||
326 | $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
327 | mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
328 | # source='$<' object='$@' libtool=yes \ | ||
329 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ | ||
330 | # $(LTCOMPILE) -c -o $@ $< | ||
331 | |||
332 | mostlyclean-libtool: | ||
333 | -rm -f *.lo | ||
334 | |||
335 | clean-libtool: | ||
336 | -rm -rf .libs _libs | ||
337 | |||
338 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
339 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
340 | unique=`for i in $$list; do \ | ||
341 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
342 | done | \ | ||
343 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
344 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
345 | mkid -fID $$unique | ||
346 | tags: TAGS | ||
347 | |||
348 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
349 | $(TAGS_FILES) $(LISP) | ||
350 | tags=; \ | ||
351 | here=`pwd`; \ | ||
352 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
353 | unique=`for i in $$list; do \ | ||
354 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
355 | done | \ | ||
356 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
357 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
358 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
359 | test -n "$$unique" || unique=$$empty_fix; \ | ||
360 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
361 | $$tags $$unique; \ | ||
362 | fi | ||
363 | ctags: CTAGS | ||
364 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
365 | $(TAGS_FILES) $(LISP) | ||
366 | tags=; \ | ||
367 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
368 | unique=`for i in $$list; do \ | ||
369 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
370 | done | \ | ||
371 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
372 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
373 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
374 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
375 | $$tags $$unique | ||
376 | |||
377 | GTAGS: | ||
378 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
379 | && cd $(top_srcdir) \ | ||
380 | && gtags -i $(GTAGS_ARGS) $$here | ||
381 | |||
382 | distclean-tags: | ||
383 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
384 | |||
385 | distdir: $(DISTFILES) | ||
386 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
387 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
388 | list='$(DISTFILES)'; \ | ||
389 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
390 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
391 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
392 | case $$dist_files in \ | ||
393 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
394 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
395 | sort -u` ;; \ | ||
396 | esac; \ | ||
397 | for file in $$dist_files; do \ | ||
398 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
399 | if test -d $$d/$$file; then \ | ||
400 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
401 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
402 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
403 | fi; \ | ||
404 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
405 | else \ | ||
406 | test -f $(distdir)/$$file \ | ||
407 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
408 | || exit 1; \ | ||
409 | fi; \ | ||
410 | done | ||
411 | check-am: all-am | ||
412 | check: check-am | ||
413 | all-am: Makefile $(LTLIBRARIES) | ||
414 | installdirs: | ||
415 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
416 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
417 | done | ||
418 | install: install-am | ||
419 | install-exec: install-exec-am | ||
420 | install-data: install-data-am | ||
421 | uninstall: uninstall-am | ||
422 | |||
423 | install-am: all-am | ||
424 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
425 | |||
426 | installcheck: installcheck-am | ||
427 | install-strip: | ||
428 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
429 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
430 | `test -z '$(STRIP)' || \ | ||
431 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
432 | mostlyclean-generic: | ||
433 | |||
434 | clean-generic: | ||
435 | |||
436 | distclean-generic: | ||
437 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
438 | |||
439 | maintainer-clean-generic: | ||
440 | @echo "This command is intended for maintainers to use" | ||
441 | @echo "it deletes files that may require special tools to rebuild." | ||
442 | clean: clean-am | ||
443 | |||
444 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
445 | mostlyclean-am | ||
446 | |||
447 | distclean: distclean-am | ||
448 | -rm -rf ./$(DEPDIR) | ||
449 | -rm -f Makefile | ||
450 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
451 | distclean-tags | ||
452 | |||
453 | dvi: dvi-am | ||
454 | |||
455 | dvi-am: | ||
456 | |||
457 | html: html-am | ||
458 | |||
459 | info: info-am | ||
460 | |||
461 | info-am: | ||
462 | |||
463 | install-data-am: install-pluginimpLTLIBRARIES | ||
464 | |||
465 | install-dvi: install-dvi-am | ||
466 | |||
467 | install-exec-am: | ||
468 | |||
469 | install-html: install-html-am | ||
470 | |||
471 | install-info: install-info-am | ||
472 | |||
473 | install-man: | ||
474 | |||
475 | install-pdf: install-pdf-am | ||
476 | |||
477 | install-ps: install-ps-am | ||
478 | |||
479 | installcheck-am: | ||
480 | |||
481 | maintainer-clean: maintainer-clean-am | ||
482 | -rm -rf ./$(DEPDIR) | ||
483 | -rm -f Makefile | ||
484 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
485 | |||
486 | mostlyclean: mostlyclean-am | ||
487 | |||
488 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
489 | mostlyclean-libtool | ||
490 | |||
491 | pdf: pdf-am | ||
492 | |||
493 | pdf-am: | ||
494 | |||
495 | ps: ps-am | ||
496 | |||
497 | ps-am: | ||
498 | |||
499 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
500 | |||
501 | .MAKE: install-am install-strip | ||
502 | |||
503 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
504 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
505 | distclean-compile distclean-generic distclean-libtool \ | ||
506 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
507 | install install-am install-data install-data-am install-dvi \ | ||
508 | install-dvi-am install-exec install-exec-am install-html \ | ||
509 | install-html-am install-info install-info-am install-man \ | ||
510 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
511 | install-ps install-ps-am install-strip installcheck \ | ||
512 | installcheck-am installdirs maintainer-clean \ | ||
513 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
514 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
515 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
516 | |||
517 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
518 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
519 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile.am new file mode 100644 index 0000000..7cc9cf5 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile.am | |||
@@ -0,0 +1,26 @@ | |||
1 | pluginimpdir = $(pkglibdir)/plugins/import | ||
2 | |||
3 | if EXPERIMENTAL | ||
4 | pluginimp_LTLIBRARIES = imp_blend.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_blend_la_SOURCES = imp_blend.c imp_blend_def.h \ | ||
22 | imp_blend_types.h imp_blend_chunks.h \ | ||
23 | imp_blend_sdna.c imp_blend_sdna.h \ | ||
24 | imp_blend_read.c imp_blend_read.h \ | ||
25 | imp_blend_callbacks.h imp_blend_callbacks.c | ||
26 | imp_blend_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile.in new file mode 100644 index 0000000..00b28ba --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/Makefile.in | |||
@@ -0,0 +1,519 @@ | |||
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_blend | ||
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_blend_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la | ||
58 | am_imp_blend_la_OBJECTS = imp_blend.lo imp_blend_sdna.lo \ | ||
59 | imp_blend_read.lo imp_blend_callbacks.lo | ||
60 | imp_blend_la_OBJECTS = $(am_imp_blend_la_OBJECTS) | ||
61 | @EXPERIMENTAL_TRUE@am_imp_blend_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_blend_la_SOURCES) | ||
75 | DIST_SOURCES = $(imp_blend_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_blend.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_blend_la_SOURCES = imp_blend.c imp_blend_def.h \ | ||
231 | imp_blend_types.h imp_blend_chunks.h \ | ||
232 | imp_blend_sdna.c imp_blend_sdna.h \ | ||
233 | imp_blend_read.c imp_blend_read.h \ | ||
234 | imp_blend_callbacks.h imp_blend_callbacks.c | ||
235 | |||
236 | imp_blend_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ | ||
237 | all: all-am | ||
238 | |||
239 | .SUFFIXES: | ||
240 | .SUFFIXES: .c .lo .o .obj | ||
241 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
242 | @for dep in $?; do \ | ||
243 | case '$(am__configure_deps)' in \ | ||
244 | *$$dep*) \ | ||
245 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ | ||
246 | && exit 0; \ | ||
247 | exit 1;; \ | ||
248 | esac; \ | ||
249 | done; \ | ||
250 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_blend/Makefile'; \ | ||
251 | cd $(top_srcdir) && \ | ||
252 | $(AUTOMAKE) --gnu plugins/import/imp_blend/Makefile | ||
253 | .PRECIOUS: Makefile | ||
254 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
255 | @case '$?' in \ | ||
256 | *config.status*) \ | ||
257 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
258 | *) \ | ||
259 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
260 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
261 | esac; | ||
262 | |||
263 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
264 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
265 | |||
266 | $(top_srcdir)/configure: $(am__configure_deps) | ||
267 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
268 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
269 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
270 | install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES) | ||
271 | @$(NORMAL_INSTALL) | ||
272 | test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)" | ||
273 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
274 | if test -f $$p; then \ | ||
275 | f=$(am__strip_dir) \ | ||
276 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \ | ||
277 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \ | ||
278 | else :; fi; \ | ||
279 | done | ||
280 | |||
281 | uninstall-pluginimpLTLIBRARIES: | ||
282 | @$(NORMAL_UNINSTALL) | ||
283 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
284 | p=$(am__strip_dir) \ | ||
285 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \ | ||
286 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \ | ||
287 | done | ||
288 | |||
289 | clean-pluginimpLTLIBRARIES: | ||
290 | -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES) | ||
291 | @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \ | ||
292 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
293 | test "$$dir" != "$$p" || dir=.; \ | ||
294 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
295 | rm -f "$${dir}/so_locations"; \ | ||
296 | done | ||
297 | imp_blend.la: $(imp_blend_la_OBJECTS) $(imp_blend_la_DEPENDENCIES) | ||
298 | $(LINK) $(am_imp_blend_la_rpath) $(imp_blend_la_OBJECTS) $(imp_blend_la_LIBADD) $(LIBS) | ||
299 | |||
300 | mostlyclean-compile: | ||
301 | -rm -f *.$(OBJEXT) | ||
302 | |||
303 | distclean-compile: | ||
304 | -rm -f *.tab.c | ||
305 | |||
306 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_blend.Plo@am__quote@ | ||
307 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_blend_callbacks.Plo@am__quote@ | ||
308 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_blend_read.Plo@am__quote@ | ||
309 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_blend_sdna.Plo@am__quote@ | ||
310 | |||
311 | .c.o: | ||
312 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
313 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
314 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
315 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
316 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
317 | |||
318 | .c.obj: | ||
319 | @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
320 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
321 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
322 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
323 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
324 | |||
325 | .c.lo: | ||
326 | @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
327 | @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
328 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
329 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
330 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
331 | |||
332 | mostlyclean-libtool: | ||
333 | -rm -f *.lo | ||
334 | |||
335 | clean-libtool: | ||
336 | -rm -rf .libs _libs | ||
337 | |||
338 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
339 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
340 | unique=`for i in $$list; do \ | ||
341 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
342 | done | \ | ||
343 | $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ | ||
344 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
345 | mkid -fID $$unique | ||
346 | tags: TAGS | ||
347 | |||
348 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
349 | $(TAGS_FILES) $(LISP) | ||
350 | tags=; \ | ||
351 | here=`pwd`; \ | ||
352 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
353 | unique=`for i in $$list; do \ | ||
354 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
355 | done | \ | ||
356 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
357 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
358 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
359 | test -n "$$unique" || unique=$$empty_fix; \ | ||
360 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
361 | $$tags $$unique; \ | ||
362 | fi | ||
363 | ctags: CTAGS | ||
364 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
365 | $(TAGS_FILES) $(LISP) | ||
366 | tags=; \ | ||
367 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
368 | unique=`for i in $$list; do \ | ||
369 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
370 | done | \ | ||
371 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
372 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
373 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
374 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
375 | $$tags $$unique | ||
376 | |||
377 | GTAGS: | ||
378 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
379 | && cd $(top_srcdir) \ | ||
380 | && gtags -i $(GTAGS_ARGS) $$here | ||
381 | |||
382 | distclean-tags: | ||
383 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
384 | |||
385 | distdir: $(DISTFILES) | ||
386 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
387 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
388 | list='$(DISTFILES)'; \ | ||
389 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
390 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
391 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
392 | case $$dist_files in \ | ||
393 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
394 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
395 | sort -u` ;; \ | ||
396 | esac; \ | ||
397 | for file in $$dist_files; do \ | ||
398 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
399 | if test -d $$d/$$file; then \ | ||
400 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
401 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
402 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
403 | fi; \ | ||
404 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
405 | else \ | ||
406 | test -f $(distdir)/$$file \ | ||
407 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
408 | || exit 1; \ | ||
409 | fi; \ | ||
410 | done | ||
411 | check-am: all-am | ||
412 | check: check-am | ||
413 | all-am: Makefile $(LTLIBRARIES) | ||
414 | installdirs: | ||
415 | for dir in "$(DESTDIR)$(pluginimpdir)"; do \ | ||
416 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
417 | done | ||
418 | install: install-am | ||
419 | install-exec: install-exec-am | ||
420 | install-data: install-data-am | ||
421 | uninstall: uninstall-am | ||
422 | |||
423 | install-am: all-am | ||
424 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
425 | |||
426 | installcheck: installcheck-am | ||
427 | install-strip: | ||
428 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
429 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
430 | `test -z '$(STRIP)' || \ | ||
431 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
432 | mostlyclean-generic: | ||
433 | |||
434 | clean-generic: | ||
435 | |||
436 | distclean-generic: | ||
437 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
438 | |||
439 | maintainer-clean-generic: | ||
440 | @echo "This command is intended for maintainers to use" | ||
441 | @echo "it deletes files that may require special tools to rebuild." | ||
442 | clean: clean-am | ||
443 | |||
444 | clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \ | ||
445 | mostlyclean-am | ||
446 | |||
447 | distclean: distclean-am | ||
448 | -rm -rf ./$(DEPDIR) | ||
449 | -rm -f Makefile | ||
450 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
451 | distclean-tags | ||
452 | |||
453 | dvi: dvi-am | ||
454 | |||
455 | dvi-am: | ||
456 | |||
457 | html: html-am | ||
458 | |||
459 | info: info-am | ||
460 | |||
461 | info-am: | ||
462 | |||
463 | install-data-am: install-pluginimpLTLIBRARIES | ||
464 | |||
465 | install-dvi: install-dvi-am | ||
466 | |||
467 | install-exec-am: | ||
468 | |||
469 | install-html: install-html-am | ||
470 | |||
471 | install-info: install-info-am | ||
472 | |||
473 | install-man: | ||
474 | |||
475 | install-pdf: install-pdf-am | ||
476 | |||
477 | install-ps: install-ps-am | ||
478 | |||
479 | installcheck-am: | ||
480 | |||
481 | maintainer-clean: maintainer-clean-am | ||
482 | -rm -rf ./$(DEPDIR) | ||
483 | -rm -f Makefile | ||
484 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
485 | |||
486 | mostlyclean: mostlyclean-am | ||
487 | |||
488 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
489 | mostlyclean-libtool | ||
490 | |||
491 | pdf: pdf-am | ||
492 | |||
493 | pdf-am: | ||
494 | |||
495 | ps: ps-am | ||
496 | |||
497 | ps-am: | ||
498 | |||
499 | uninstall-am: uninstall-pluginimpLTLIBRARIES | ||
500 | |||
501 | .MAKE: install-am install-strip | ||
502 | |||
503 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
504 | clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \ | ||
505 | distclean-compile distclean-generic distclean-libtool \ | ||
506 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
507 | install install-am install-data install-data-am install-dvi \ | ||
508 | install-dvi-am install-exec install-exec-am install-html \ | ||
509 | install-html-am install-info install-info-am install-man \ | ||
510 | install-pdf install-pdf-am install-pluginimpLTLIBRARIES \ | ||
511 | install-ps install-ps-am install-strip installcheck \ | ||
512 | installcheck-am installdirs maintainer-clean \ | ||
513 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
514 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
515 | tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES | ||
516 | |||
517 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
518 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
519 | .NOEXPORT: | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend.c new file mode 100644 index 0000000..7893c1e --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend.c | |||
@@ -0,0 +1,201 @@ | |||
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 <string.h> | ||
24 | #include <stdlib.h> | ||
25 | |||
26 | #include <g3d/types.h> | ||
27 | #include <g3d/stream.h> | ||
28 | |||
29 | #include "imp_blend_def.h" | ||
30 | #include "imp_blend_types.h" | ||
31 | #include "imp_blend_sdna.h" | ||
32 | #include "imp_blend_read.h" | ||
33 | #include "imp_blend_chunks.h" | ||
34 | |||
35 | static gboolean blend_read_file(BlendGlobal *global); | ||
36 | |||
37 | EAPI | ||
38 | gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream, | ||
39 | G3DModel *model, gpointer user_data) | ||
40 | { | ||
41 | gchar buf[BLEND_HEADER_SIZE + 1]; | ||
42 | guint32 flags = 0, version; | ||
43 | BlendGlobal *global; | ||
44 | |||
45 | if(g3d_stream_read(stream, buf, BLEND_HEADER_SIZE) != BLEND_HEADER_SIZE) { | ||
46 | g_warning("Blend: %s: failed to read header", stream->uri); | ||
47 | return FALSE; | ||
48 | } | ||
49 | buf[BLEND_HEADER_SIZE] = '\0'; | ||
50 | if(strncmp(buf, "BLENDER", 7) != 0) { | ||
51 | g_warning("Blend: %s: not a blender file", stream->uri); | ||
52 | return FALSE; | ||
53 | } | ||
54 | if(buf[7] == '_') | ||
55 | flags |= FLAG_POINTERSIZE_4; | ||
56 | if(buf[8] == 'v') | ||
57 | flags |= FLAG_LITTLE_ENDIAN; | ||
58 | version = atoi(buf + 9); | ||
59 | |||
60 | g_debug("Blend: version %.2f, %s endian, pointer size is %d", | ||
61 | version / 100.0, | ||
62 | (flags & FLAG_LITTLE_ENDIAN) ? "little" : "big", | ||
63 | (flags & FLAG_POINTERSIZE_4) ? 4 : 8); | ||
64 | |||
65 | if(!(flags & FLAG_POINTERSIZE_4)) { | ||
66 | g_warning("Blend: 8-byte pointers are not implemented as I lack a " | ||
67 | "test file. Please send me one :)."); | ||
68 | return FALSE; | ||
69 | } | ||
70 | |||
71 | global = g_new0(BlendGlobal, 1); | ||
72 | global->context = context; | ||
73 | global->stream = stream; | ||
74 | global->model = model; | ||
75 | global->flags = flags; | ||
76 | |||
77 | blend_read_file(global); | ||
78 | |||
79 | g_free(global); | ||
80 | |||
81 | return TRUE; | ||
82 | } | ||
83 | |||
84 | EAPI | ||
85 | gchar *plugin_description(void) | ||
86 | { | ||
87 | return g_strdup("Blender models."); | ||
88 | } | ||
89 | |||
90 | EAPI | ||
91 | gchar **plugin_extensions(void) | ||
92 | { | ||
93 | return g_strsplit("blend", ":", 0); | ||
94 | } | ||
95 | |||
96 | /*****************************************************************************/ | ||
97 | |||
98 | static inline const BlendChunkInfo *blend_get_chunk_info(guint32 code, | ||
99 | guint32 oid) | ||
100 | { | ||
101 | gint32 i; | ||
102 | |||
103 | for(i = 0; blend_chunks[i].code != 0; i ++) | ||
104 | if((blend_chunks[i].code == code) && (blend_chunks[i].oid == oid)) | ||
105 | return &(blend_chunks[i]); | ||
106 | if(oid != 0) | ||
107 | return blend_get_chunk_info(code, 0); | ||
108 | return NULL; | ||
109 | } | ||
110 | |||
111 | static gboolean blend_read_file(BlendGlobal *global) | ||
112 | { | ||
113 | guint32 code, old, sdnanr, nr; | ||
114 | gsize len; | ||
115 | BlendLocal *local; | ||
116 | const BlendChunkInfo *cinfo; | ||
117 | const BlendSdnaStruct *sstruct; | ||
118 | gint i; | ||
119 | G3DObject *object = NULL; | ||
120 | G3DObject *grpobject = NULL; | ||
121 | guint32 object_id = 0; | ||
122 | |||
123 | while(TRUE) { | ||
124 | code = blend_read_uint(global->stream, global->flags); | ||
125 | len = blend_read_uint(global->stream, global->flags); | ||
126 | if(code == MKID('E','N','D','B')) | ||
127 | return TRUE; | ||
128 | |||
129 | old = blend_read_uint(global->stream, global->flags); | ||
130 | sdnanr = blend_read_uint(global->stream, global->flags); | ||
131 | nr = blend_read_uint(global->stream, global->flags); | ||
132 | |||
133 | if((global->sdna == NULL) && (code != MKID('D','N','A','1'))) { | ||
134 | g3d_stream_skip(global->stream, len); | ||
135 | continue; | ||
136 | } | ||
137 | |||
138 | cinfo = blend_get_chunk_info(code, (code == ID_DATA) ? object_id : 0); | ||
139 | if(cinfo == NULL) | ||
140 | g_warning("unknown chunk: %c%c%c%c", | ||
141 | blend_from_id(code, 0), blend_from_id(code, 1), | ||
142 | blend_from_id(code, 2), blend_from_id(code, 3)); | ||
143 | |||
144 | g_debug("\\%c%c%c%c: %-20s - %8d bytes (0x%08x, %d, %d)", | ||
145 | blend_from_id(code, 0), blend_from_id(code, 1), | ||
146 | blend_from_id(code, 2), blend_from_id(code, 3), | ||
147 | cinfo ? cinfo->description : "(unknown)", | ||
148 | (int) len, old, sdnanr, nr); | ||
149 | |||
150 | if(len == 0) | ||
151 | return FALSE; | ||
152 | |||
153 | /* on non-DATA nodes a new object starts */ | ||
154 | if(code != ID_DATA) { | ||
155 | object_id = code; | ||
156 | } | ||
157 | |||
158 | local = g_new0(BlendLocal, 1); | ||
159 | local->ndata = nr; | ||
160 | local->data = g_new0(BlendSdnaData *, nr); | ||
161 | |||
162 | if(global->sdna) { | ||
163 | for(i = 0; i < nr; i ++) { | ||
164 | sstruct = blend_sdna_get_struct_by_id(global->sdna, sdnanr); | ||
165 | if(sstruct) { | ||
166 | #if DEBUG > BLEND_DEBUG_STRUCT | ||
167 | g_debug("|struct %s /* %d */", | ||
168 | sstruct->name, sstruct->size); | ||
169 | #endif | ||
170 | local->data[i] = blend_sdna_data_read(global->sdna, | ||
171 | sstruct, global, &len, 0); | ||
172 | } | ||
173 | } | ||
174 | } | ||
175 | |||
176 | local->object = object; | ||
177 | local->grpobject = grpobject; | ||
178 | local->object_id = object_id; | ||
179 | local->len = len; | ||
180 | |||
181 | if(cinfo && cinfo->callback) | ||
182 | if(!cinfo->callback(global, local)) | ||
183 | return FALSE; | ||
184 | |||
185 | len = local->len; | ||
186 | object = local->object; | ||
187 | grpobject = local->grpobject; | ||
188 | |||
189 | for(i = 0; i < local->ndata; i ++) | ||
190 | if(local->data[i]) | ||
191 | blend_sdna_data_free(local->data[i]); | ||
192 | g_free(local->data); | ||
193 | g_free(local); | ||
194 | |||
195 | /* skip remaining data */ | ||
196 | g3d_stream_skip(global->stream, len); | ||
197 | } | ||
198 | |||
199 | blend_sdna_cleanup(global->sdna); | ||
200 | return TRUE; | ||
201 | } | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_callbacks.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_callbacks.c new file mode 100644 index 0000000..f5e7b95 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_callbacks.c | |||
@@ -0,0 +1,237 @@ | |||
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/vector.h> | ||
25 | #include <g3d/matrix.h> | ||
26 | #include <g3d/material.h> | ||
27 | |||
28 | #include "imp_blend_types.h" | ||
29 | #include "imp_blend_def.h" | ||
30 | #include "imp_blend_sdna.h" | ||
31 | |||
32 | /* mesh data */ | ||
33 | gboolean blend_cb_DATA_ME(BlendGlobal *global, BlendLocal *local) | ||
34 | { | ||
35 | G3DFace *face; | ||
36 | BlendSdnaPropData *spdata; | ||
37 | gchar *stmp; | ||
38 | gint32 i, j; | ||
39 | |||
40 | if((local->ndata == 0) || (local->data[0] == NULL)) | ||
41 | return TRUE; | ||
42 | g_return_val_if_fail(local->object != NULL, FALSE); | ||
43 | |||
44 | /* all structs in one DATA chunk have the same type */ | ||
45 | if(strcmp(local->data[0]->sstruct->name, "MVert") == 0) { | ||
46 | local->object->vertex_count = local->ndata; | ||
47 | local->object->vertex_data = g3d_vector_new(3, | ||
48 | local->object->vertex_count); | ||
49 | for(i = 0; i < local->ndata; i ++) { | ||
50 | spdata = blend_sdna_get_property(local->data[i], "co", T_FLOAT); | ||
51 | if(spdata) | ||
52 | for(j = 0; j < 3; j ++) | ||
53 | local->object->vertex_data[i * 3 + j] = spdata->fval[j]; | ||
54 | } | ||
55 | } else if(strcmp(local->data[0]->sstruct->name, "MFace") == 0) { | ||
56 | for(i = 0; i < local->ndata; i ++) { | ||
57 | face = g_new0(G3DFace, 1); | ||
58 | face->vertex_count = 4; | ||
59 | face->vertex_indices = g_new0(guint32, 4); | ||
60 | face->material = g_slist_nth_data(local->object->materials, 0); | ||
61 | local->object->faces = g_slist_prepend(local->object->faces, face); | ||
62 | for(j = 0; j < 4; j ++) { | ||
63 | stmp = g_strdup_printf("v%d", j); | ||
64 | spdata = blend_sdna_get_property(local->data[i], stmp, T_INT); | ||
65 | if(spdata) | ||
66 | face->vertex_indices[j] = spdata->ival[0]; | ||
67 | g_free(stmp); | ||
68 | } | ||
69 | #if DEBUG > 2 | ||
70 | g_debug("MFace: %03i (%02i, %02i, %02i, %02i)", i, | ||
71 | face->vertex_indices[0], face->vertex_indices[1], | ||
72 | face->vertex_indices[2], face->vertex_indices[3]); | ||
73 | #endif | ||
74 | spdata = blend_sdna_get_property(local->data[i], "mat_nr", T_CHAR); | ||
75 | /* TODO */ | ||
76 | } | ||
77 | } else { | ||
78 | #if DEBUG > 0 | ||
79 | for(i = 0; i < local->ndata; i ++) | ||
80 | blend_sdna_dump_data(local->data[i], 0); | ||
81 | #endif | ||
82 | } | ||
83 | return TRUE; | ||
84 | } | ||
85 | |||
86 | /* struct DNA */ | ||
87 | gboolean blend_cb_DNA1(BlendGlobal *global, BlendLocal *local) | ||
88 | { | ||
89 | if(global->sdna != NULL) | ||
90 | return TRUE; | ||
91 | global->sdna = blend_sdna_read_dna1(global->stream, | ||
92 | global->flags, local->len); | ||
93 | if(global->sdna == NULL) { | ||
94 | g_warning("Blend: failed to read DNA1, giving up..."); | ||
95 | return FALSE; | ||
96 | } | ||
97 | /* rewind stream to really read content */ | ||
98 | g3d_stream_seek(global->stream, BLEND_HEADER_SIZE, G_SEEK_SET); | ||
99 | local->len = 0; | ||
100 | return TRUE; | ||
101 | } | ||
102 | |||
103 | static gchar *get_name_from_id(BlendSdnaData *sdata) | ||
104 | { | ||
105 | BlendSdnaPropData *spdata, *spdata2; | ||
106 | gchar *name = NULL; | ||
107 | gint32 i; | ||
108 | |||
109 | spdata = blend_sdna_get_property(sdata, "id", T_STRUCT); | ||
110 | if(spdata) { | ||
111 | spdata2 = blend_sdna_get_property(spdata->structval, "name", T_CHAR); | ||
112 | if(spdata2) { | ||
113 | name = g_new0(gchar, spdata2->sprop->nitems + 1); | ||
114 | for(i = 0; i < spdata2->sprop->nitems; i ++) | ||
115 | name[i] = spdata2->ival[i]; | ||
116 | } | ||
117 | } | ||
118 | return name; | ||
119 | } | ||
120 | |||
121 | static G3DFloat get_float(BlendSdnaData *sdata, const gchar *var) | ||
122 | { | ||
123 | BlendSdnaPropData *spdata; | ||
124 | spdata = blend_sdna_get_property(sdata, var, T_FLOAT); | ||
125 | if(spdata) | ||
126 | return spdata->fval[0]; | ||
127 | return 0.0; | ||
128 | } | ||
129 | |||
130 | /* material */ | ||
131 | gboolean blend_cb_MA(BlendGlobal *global, BlendLocal *local) | ||
132 | { | ||
133 | G3DMaterial *material; | ||
134 | |||
135 | g_return_val_if_fail(local->data[0] != NULL, FALSE); | ||
136 | |||
137 | #if DEBUG > 0 | ||
138 | blend_sdna_dump_data(local->data[0], 0); | ||
139 | #endif | ||
140 | |||
141 | material = g3d_material_new(); | ||
142 | material->name = get_name_from_id(local->data[0]); | ||
143 | global->model->materials = g_slist_append(global->model->materials, | ||
144 | material); | ||
145 | material->r = get_float(local->data[0], "r"); | ||
146 | material->g = get_float(local->data[0], "g"); | ||
147 | material->b = get_float(local->data[0], "b"); | ||
148 | return TRUE; | ||
149 | } | ||
150 | |||
151 | /* mesh */ | ||
152 | gboolean blend_cb_ME(BlendGlobal *global, BlendLocal *local) | ||
153 | { | ||
154 | G3DObject *object; | ||
155 | G3DMaterial *material; | ||
156 | G3DVector v[3]; | ||
157 | BlendSdnaPropData *spdata; | ||
158 | gint32 i; | ||
159 | |||
160 | g_return_val_if_fail(local->data[0] != NULL, FALSE); | ||
161 | |||
162 | #if DEBUG > 0 | ||
163 | blend_sdna_dump_data(local->data[0], 0); | ||
164 | #endif | ||
165 | |||
166 | object = g_new0(G3DObject, 1); | ||
167 | if(local->grpobject) | ||
168 | local->grpobject->objects = g_slist_append(local->grpobject->objects, | ||
169 | object); | ||
170 | else | ||
171 | global->model->objects = g_slist_append(global->model->objects, | ||
172 | object); | ||
173 | local->object = object; | ||
174 | material = g3d_material_new(); | ||
175 | material->name = g_strdup("(default material)"); | ||
176 | object->materials = g_slist_append(local->object->materials, material); | ||
177 | |||
178 | /* name */ | ||
179 | object->name = get_name_from_id(local->data[0]); | ||
180 | |||
181 | object->transformation = g_new0(G3DTransformation, 1); | ||
182 | g3d_matrix_identity(object->transformation->matrix); | ||
183 | |||
184 | /* rotation */ | ||
185 | spdata = blend_sdna_get_property(local->data[0], "rot", T_FLOAT); | ||
186 | if(spdata) { | ||
187 | for(i = 0; i < 3; i ++) | ||
188 | v[i] = spdata->fval[i]; | ||
189 | g3d_matrix_rotate_xyz(v[0], v[1], v[2], | ||
190 | object->transformation->matrix); | ||
191 | #if DEBUG > 0 | ||
192 | g_debug("ME: rotate %f, %f, %f", v[0], v[1], v[2]); | ||
193 | #endif | ||
194 | } | ||
195 | /* size */ | ||
196 | spdata = blend_sdna_get_property(local->data[0], "size", T_FLOAT); | ||
197 | if(spdata) { | ||
198 | for(i = 0; i < 3; i ++) | ||
199 | v[i] = spdata->fval[i]; | ||
200 | g3d_matrix_scale(v[0], v[1], v[2], object->transformation->matrix); | ||
201 | #if DEBUG > 2 | ||
202 | g_debug("ME: scale %f, %f, %f", v[0], v[1], v[2]); | ||
203 | #endif | ||
204 | } | ||
205 | /* location */ | ||
206 | spdata = blend_sdna_get_property(local->data[0], "loc", T_FLOAT); | ||
207 | if(spdata) { | ||
208 | for(i = 0; i < 3; i ++) | ||
209 | v[i] = spdata->fval[i]; | ||
210 | g3d_matrix_translate(v[0], v[1], v[2], | ||
211 | object->transformation->matrix); | ||
212 | #if DEBUG > 2 | ||
213 | g_debug("ME: translate %f, %f, %f", v[0], v[1], v[2]); | ||
214 | #endif | ||
215 | } | ||
216 | return TRUE; | ||
217 | } | ||
218 | |||
219 | gboolean blend_cb_OB(BlendGlobal *global, BlendLocal *local) | ||
220 | { | ||
221 | G3DObject *object; | ||
222 | |||
223 | g_return_val_if_fail(local->data[0] != NULL, FALSE); | ||
224 | |||
225 | #if DEBUG > 0 | ||
226 | blend_sdna_dump_data(local->data[0], 0); | ||
227 | #endif | ||
228 | |||
229 | object = g_new0(G3DObject, 1); | ||
230 | object->name = get_name_from_id(local->data[0]); | ||
231 | local->grpobject = object; | ||
232 | global->model->objects = g_slist_append(global->model->objects, object); | ||
233 | |||
234 | return TRUE; | ||
235 | } | ||
236 | |||
237 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_callbacks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_callbacks.h new file mode 100644 index 0000000..160fd07 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_callbacks.h | |||
@@ -0,0 +1,35 @@ | |||
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_BLEND_CALLBACKS_H | ||
23 | #define _IMP_BLEND_CALLBACKS_H | ||
24 | |||
25 | #include "imp_blend_types.h" | ||
26 | |||
27 | gboolean blend_cb_DATA_ME(BlendGlobal *global, BlendLocal *local); | ||
28 | |||
29 | gboolean blend_cb_DNA1(BlendGlobal *global, BlendLocal *local); | ||
30 | |||
31 | gboolean blend_cb_MA(BlendGlobal *global, BlendLocal *local); | ||
32 | gboolean blend_cb_ME(BlendGlobal *global, BlendLocal *local); | ||
33 | gboolean blend_cb_OB(BlendGlobal *global, BlendLocal *local); | ||
34 | |||
35 | #endif /* _IMP_BLEND_CALLBACKS_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_chunks.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_chunks.h new file mode 100644 index 0000000..6ab82bd --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_chunks.h | |||
@@ -0,0 +1,63 @@ | |||
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_BLEND_CHUNKS_H | ||
23 | #define _IMP_BLEND_CHUNKS_H | ||
24 | |||
25 | #include "imp_blend_def.h" | ||
26 | #include "imp_blend_types.h" | ||
27 | #include "imp_blend_callbacks.h" | ||
28 | |||
29 | typedef gboolean (* BlendCallback)(BlendGlobal *, BlendLocal *); | ||
30 | |||
31 | typedef struct { | ||
32 | guint32 code; | ||
33 | guint32 oid; | ||
34 | const gchar *description; | ||
35 | BlendCallback callback; | ||
36 | } BlendChunkInfo; | ||
37 | |||
38 | #define ID_DATA MKID('D','A','T','A') | ||
39 | |||
40 | static const BlendChunkInfo blend_chunks[] = { | ||
41 | { ID_DATA, MKID2('M','E'), "mesh data", blend_cb_DATA_ME }, | ||
42 | { ID_DATA, 0, "struct data", NULL }, | ||
43 | |||
44 | { MKID2('C','A'), 0, "camera", NULL }, | ||
45 | { MKID2('I','M'), 0, "image", NULL }, | ||
46 | { MKID2('L','A'), 0, "lamp", NULL }, | ||
47 | { MKID2('M','A'), 0, "material", blend_cb_MA }, | ||
48 | { MKID2('M','E'), 0, "mesh", blend_cb_ME }, | ||
49 | { MKID2('O','B'), 0, "object", blend_cb_OB }, | ||
50 | { MKID2('S','C'), 0, "scene", NULL }, | ||
51 | { MKID2('S','R'), 0, "screen", NULL }, | ||
52 | { MKID2('T','E'), 0, "texture", NULL }, | ||
53 | { MKID2('T','X'), 0, "text", NULL }, | ||
54 | { MKID2('W','O'), 0, "world", NULL }, | ||
55 | |||
56 | { MKID('D','N','A','1'), 0, "SDNA data", blend_cb_DNA1 }, | ||
57 | { MKID('G','L','O','B'), 0, "global data", NULL }, | ||
58 | { MKID('R','E','N','D'), 0, "render data", NULL }, | ||
59 | |||
60 | { 0, 0, NULL, NULL } | ||
61 | }; | ||
62 | |||
63 | #endif /* _IMP_BLEND_CHUNKS_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h new file mode 100644 index 0000000..0a89af4 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_def.h | |||
@@ -0,0 +1,42 @@ | |||
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_BLEND_DEF_H | ||
23 | #define _IMP_BLEND_DEF_H | ||
24 | |||
25 | #include <glib.h> | ||
26 | |||
27 | #define BLEND_HEADER_SIZE 12 | ||
28 | |||
29 | #define FLAG_LITTLE_ENDIAN 1 | ||
30 | #define FLAG_POINTERSIZE_4 4 | ||
31 | #define FLAG_POINTERSIZE_8 8 | ||
32 | #define FLAG_POINTER_MASK 0xC | ||
33 | |||
34 | #define MKID(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24)) | ||
35 | #define MKID2(a,b) ((a) | ((b) << 8)) | ||
36 | |||
37 | static inline gchar blend_from_id(guint32 id, guint8 pos) { | ||
38 | guint8 c = ((id >> (pos * 8)) & 0xFF); | ||
39 | return ((c < 0x20) || (c > 0x7F)) ? '_' : c; | ||
40 | } | ||
41 | |||
42 | #endif /* _IMP_BLEND_DEF_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_read.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_read.c new file mode 100644 index 0000000..b73c5dc --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_read.c | |||
@@ -0,0 +1,39 @@ | |||
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 <g3d/stream.h> | ||
23 | |||
24 | #include "imp_blend_def.h" | ||
25 | |||
26 | guint32 blend_read_short(G3DStream *stream, guint32 flags) | ||
27 | { | ||
28 | return (flags & FLAG_LITTLE_ENDIAN) ? | ||
29 | g3d_stream_read_int16_le(stream) : | ||
30 | g3d_stream_read_int16_be(stream); | ||
31 | } | ||
32 | |||
33 | guint32 blend_read_uint(G3DStream *stream, guint32 flags) | ||
34 | { | ||
35 | return (flags & FLAG_LITTLE_ENDIAN) ? | ||
36 | g3d_stream_read_int32_le(stream) : | ||
37 | g3d_stream_read_int32_be(stream); | ||
38 | } | ||
39 | |||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_read.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_read.h new file mode 100644 index 0000000..4f0626d --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_read.h | |||
@@ -0,0 +1,30 @@ | |||
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_BLEND_READ_H | ||
23 | #define _IMP_BLEND_READ_H | ||
24 | |||
25 | #include <g3d/stream.h> | ||
26 | |||
27 | guint32 blend_read_short(G3DStream *stream, guint32 flags); | ||
28 | guint32 blend_read_uint(G3DStream *stream, guint32 flags); | ||
29 | |||
30 | #endif /* _IMP_BLEND_READ_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_sdna.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_sdna.c new file mode 100644 index 0000000..058832a --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_sdna.c | |||
@@ -0,0 +1,467 @@ | |||
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 <string.h> | ||
24 | #include <stdlib.h> | ||
25 | |||
26 | #include <g3d/debug.h> | ||
27 | |||
28 | #include "imp_blend_def.h" | ||
29 | #include "imp_blend_types.h" | ||
30 | #include "imp_blend_sdna.h" | ||
31 | #include "imp_blend_read.h" | ||
32 | |||
33 | static gboolean sdna_prop_check_array(BlendSdnaProperty *sprop) | ||
34 | { | ||
35 | gchar *ob; | ||
36 | guint32 n; | ||
37 | |||
38 | while(TRUE) { | ||
39 | ob = strrchr(sprop->name, '['); | ||
40 | if(ob == NULL) | ||
41 | return TRUE; | ||
42 | n = atoi(ob + 1); | ||
43 | if(n == 0) | ||
44 | return FALSE; | ||
45 | sprop->nitems *= n; | ||
46 | *ob = '\0'; | ||
47 | } | ||
48 | return FALSE; | ||
49 | } | ||
50 | |||
51 | BlendSdna *blend_sdna_read_dna1(G3DStream *stream, guint32 flags, gint32 len) | ||
52 | { | ||
53 | BlendSdna *sdna; | ||
54 | BlendSdnaProperty *sprop; | ||
55 | BlendSdnaStruct *sstruct; | ||
56 | guint32 code, n, n2, nn, m, t; | ||
57 | gint32 i, j; | ||
58 | gchar buf[2048], *bufp, c, **aptr; | ||
59 | |||
60 | code = blend_read_uint(stream, flags); | ||
61 | len -= 4; | ||
62 | if(code != MKID('S','D','N','A')) { | ||
63 | g_warning("Blend: DNA1: no SDNA"); | ||
64 | g3d_stream_skip(stream, len); | ||
65 | return NULL; | ||
66 | } | ||
67 | |||
68 | sdna = g_new0(BlendSdna, 1); | ||
69 | |||
70 | while(len > 0) { | ||
71 | code = blend_read_uint(stream, flags); | ||
72 | len -= 4; | ||
73 | |||
74 | switch(code) { | ||
75 | case MKID('N','A','M','E'): | ||
76 | case MKID('T','Y','P','E'): | ||
77 | n = blend_read_uint(stream, flags); | ||
78 | len -= 4; | ||
79 | if(code == MKID('T','Y','P','E')) { | ||
80 | g_debug("\\ TYPE: %d types", n); | ||
81 | sdna->n_types = n; | ||
82 | sdna->type_names = g_new0(gchar *, n); | ||
83 | sdna->type_sizes = g_new0(guint32, n); | ||
84 | aptr = sdna->type_names; | ||
85 | } else { | ||
86 | g_debug("\\ NAME: %d names", n); | ||
87 | sdna->n_names = n; | ||
88 | sdna->names = g_new0(gchar *, n); | ||
89 | aptr = sdna->names; | ||
90 | } | ||
91 | m = 0; | ||
92 | for(i = 0; i < n; i ++) { | ||
93 | bufp = buf; | ||
94 | do { | ||
95 | c = *bufp = g3d_stream_read_int8(stream); | ||
96 | bufp ++; | ||
97 | len --; | ||
98 | m ++; | ||
99 | } while(c != '\0'); | ||
100 | aptr[i] = g_strdup(buf); | ||
101 | #if DEBUG > 2 | ||
102 | g_debug("\\ %s", buf); | ||
103 | #endif | ||
104 | } | ||
105 | m %= 4; | ||
106 | if(m > 0) { | ||
107 | /* padding */ | ||
108 | g3d_stream_skip(stream, 4 - m); | ||
109 | len -= (4 - m); | ||
110 | } | ||
111 | break; | ||
112 | case MKID('T','L','E','N'): | ||
113 | g_debug("\\ TLEN: %d type sizes", sdna->n_types); | ||
114 | for(i = 0; i < sdna->n_types; i ++) { | ||
115 | m = blend_read_short(stream, flags); | ||
116 | len -= 2; | ||
117 | #if DEBUG > 2 | ||
118 | g_debug("\\ %d", m); | ||
119 | #endif | ||
120 | sdna->type_sizes[i] = m; | ||
121 | } | ||
122 | m = sdna->n_types % 2; | ||
123 | if(m > 0) { | ||
124 | g3d_stream_skip(stream, 2); | ||
125 | len -= 2; | ||
126 | } | ||
127 | break; | ||
128 | case MKID('S','T','R','C'): | ||
129 | n = blend_read_uint(stream, flags); | ||
130 | g_debug("\\ STRC: %d structs", n); | ||
131 | len -= 4; | ||
132 | for(i = 0; i < n; i ++) { | ||
133 | t = blend_read_short(stream, flags); | ||
134 | n2 = blend_read_short(stream, flags); | ||
135 | len -= 4; | ||
136 | sstruct = g_new0(BlendSdnaStruct, 1); | ||
137 | sstruct->tid = t; | ||
138 | sstruct->name = sdna->type_names[t]; | ||
139 | sstruct->size = sdna->type_sizes[t]; | ||
140 | sdna->structs = g_slist_append(sdna->structs, sstruct); | ||
141 | for(j = 0; j < n2; j ++) { | ||
142 | t = blend_read_short(stream, flags); | ||
143 | nn = blend_read_short(stream, flags); | ||
144 | len -= 4; | ||
145 | sprop = g_new0(BlendSdnaProperty, 1); | ||
146 | sprop->name = g_strdup(sdna->names[nn]); | ||
147 | sprop->tname = sdna->type_names[t]; | ||
148 | sprop->tid = t; | ||
149 | sprop->tsize = sdna->type_sizes[t]; | ||
150 | sprop->ptr = | ||
151 | (sprop->name[0] == '*') || | ||
152 | (sprop->name[0] == '('); | ||
153 | sprop->nitems = 1; | ||
154 | sdna_prop_check_array(sprop); | ||
155 | sstruct->properties = g_slist_append( | ||
156 | sstruct->properties, sprop); | ||
157 | } | ||
158 | } | ||
159 | break; | ||
160 | default: | ||
161 | g_warning("Blend: DNA1: unexpected section 0x%x", code); | ||
162 | return sdna; | ||
163 | break; | ||
164 | } | ||
165 | } | ||
166 | return sdna; | ||
167 | } | ||
168 | |||
169 | static void blend_sdna_struct_free(BlendSdnaStruct *sstruct) | ||
170 | { | ||
171 | GSList *item, *next; | ||
172 | BlendSdnaProperty *sprop; | ||
173 | |||
174 | item = sstruct->properties; | ||
175 | while(item) { | ||
176 | sprop = item->data; | ||
177 | next = item->next; | ||
178 | g_free(sprop->name); | ||
179 | g_free(sprop); | ||
180 | g_slist_free_1(item); | ||
181 | item = next; | ||
182 | } | ||
183 | g_free(sstruct); | ||
184 | } | ||
185 | |||
186 | void blend_sdna_cleanup(BlendSdna *sdna) | ||
187 | { | ||
188 | GSList *item, *next; | ||
189 | BlendSdnaStruct *sstruct; | ||
190 | |||
191 | g_return_if_fail(sdna != NULL); | ||
192 | |||
193 | /* names */ | ||
194 | g_free(sdna->names); | ||
195 | /* types */ | ||
196 | g_free(sdna->type_names); | ||
197 | g_free(sdna->type_sizes); | ||
198 | /* structs */ | ||
199 | item = sdna->structs; | ||
200 | while(item) { | ||
201 | sstruct = item->data; | ||
202 | next = item->next; | ||
203 | blend_sdna_struct_free(sstruct); | ||
204 | g_slist_free_1(next); | ||
205 | item = next; | ||
206 | } | ||
207 | /* sdna */ | ||
208 | g_free(sdna); | ||
209 | } | ||
210 | |||
211 | const BlendSdnaStruct *blend_sdna_get_struct_by_id(BlendSdna *sdna, | ||
212 | guint32 sdnanr) | ||
213 | { | ||
214 | g_return_val_if_fail(sdnanr < g_slist_length(sdna->structs), NULL); | ||
215 | |||
216 | if(sdnanr < 10) | ||
217 | return NULL; | ||
218 | |||
219 | return g_slist_nth_data(sdna->structs, sdnanr); | ||
220 | } | ||
221 | |||
222 | const BlendSdnaStruct *blend_sdna_get_struct_by_tid(BlendSdna *sdna, | ||
223 | guint32 tid) | ||
224 | { | ||
225 | GSList *item; | ||
226 | BlendSdnaStruct *sstruct; | ||
227 | |||
228 | for(item = sdna->structs; item != NULL; item = item->next) { | ||
229 | sstruct = item->data; | ||
230 | if(sstruct->tid == tid) | ||
231 | return sstruct; | ||
232 | } | ||
233 | |||
234 | return NULL; | ||
235 | } | ||
236 | |||
237 | static inline void sdna_data_read_basic_types(BlendSdna *sdna, | ||
238 | BlendSdnaPropData *spdata, BlendGlobal *global, gsize *r) | ||
239 | { | ||
240 | gint32 i; | ||
241 | |||
242 | g_return_if_fail(spdata->sprop->nitems > 0); | ||
243 | |||
244 | switch(spdata->type) { | ||
245 | case T_CHAR: | ||
246 | spdata->ival = g_new0(gint32, spdata->sprop->nitems); | ||
247 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
248 | spdata->ival[i] = g3d_stream_read_int8(global->stream); | ||
249 | (*r) -= spdata->sprop->nitems; | ||
250 | break; | ||
251 | case T_UCHAR: | ||
252 | spdata->uval = g_new0(guint32, spdata->sprop->nitems); | ||
253 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
254 | spdata->uval[i] = g3d_stream_read_int8(global->stream); | ||
255 | (*r) -= spdata->sprop->nitems; | ||
256 | break; | ||
257 | case T_SHORT: /* FIXME: BE/LE */ | ||
258 | spdata->ival = g_new0(gint32, spdata->sprop->nitems); | ||
259 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
260 | spdata->ival[i] = g3d_stream_read_int16_le(global->stream); | ||
261 | (*r) -= spdata->sprop->nitems * 2; | ||
262 | break; | ||
263 | case T_USHORT: | ||
264 | spdata->uval = g_new0(guint32, spdata->sprop->nitems); | ||
265 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
266 | spdata->uval[i] = g3d_stream_read_int16_le(global->stream); | ||
267 | (*r) -= spdata->sprop->nitems * 2; | ||
268 | break; | ||
269 | case T_INT: /* FIXME: 32/64 bit */ | ||
270 | spdata->ival = g_new0(gint32, spdata->sprop->nitems); | ||
271 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
272 | spdata->ival[i] = g3d_stream_read_int32_le(global->stream); | ||
273 | (*r) -= spdata->sprop->nitems * 4; | ||
274 | break; | ||
275 | case T_LONG: | ||
276 | spdata->ival = g_new0(gint32, spdata->sprop->nitems); | ||
277 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
278 | spdata->ival[i] = g3d_stream_read_int32_le(global->stream); | ||
279 | (*r) -= spdata->sprop->nitems * 4; | ||
280 | break; | ||
281 | case T_ULONG: | ||
282 | spdata->uval = g_new0(guint32, spdata->sprop->nitems); | ||
283 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
284 | spdata->uval[i] = g3d_stream_read_int32_le(global->stream); | ||
285 | (*r) -= spdata->sprop->nitems * 4; | ||
286 | break; | ||
287 | case T_FLOAT: | ||
288 | spdata->fval = g_new0(G3DFloat, spdata->sprop->nitems); | ||
289 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
290 | spdata->fval[i] = g3d_stream_read_float_le(global->stream); | ||
291 | (*r) -= spdata->sprop->nitems * 4; | ||
292 | break; | ||
293 | case T_DOUBLE: | ||
294 | spdata->fval = g_new0(G3DFloat, spdata->sprop->nitems); | ||
295 | for(i = 0; i < spdata->sprop->nitems; i ++) | ||
296 | spdata->fval[i] = g3d_stream_read_double_le(global->stream); | ||
297 | (*r) -= spdata->sprop->nitems * 8; | ||
298 | break; | ||
299 | case T_VOID: | ||
300 | g_warning("SDNA: non-pointer void type"); | ||
301 | break; | ||
302 | case T_STRUCT: | ||
303 | /* handled elsewhere */ | ||
304 | break; | ||
305 | } | ||
306 | } | ||
307 | |||
308 | BlendSdnaPropData *blend_sdna_get_property(BlendSdnaData *sdata, | ||
309 | const gchar *name, BlendSdnaPropType type) | ||
310 | { | ||
311 | BlendSdnaPropData *spdata; | ||
312 | |||
313 | spdata = g_hash_table_lookup(sdata->prophash, name); | ||
314 | if(!spdata) | ||
315 | return NULL; | ||
316 | if(spdata->type != type) | ||
317 | return NULL; | ||
318 | return spdata; | ||
319 | } | ||
320 | |||
321 | BlendSdnaData *blend_sdna_data_read(BlendSdna *sdna, | ||
322 | const BlendSdnaStruct *sstruct, BlendGlobal *global, gsize *r, | ||
323 | guint32 level) | ||
324 | { | ||
325 | BlendSdnaData *sdata; | ||
326 | BlendSdnaProperty *sprop; | ||
327 | BlendSdnaPropData *spdata; | ||
328 | const BlendSdnaStruct *substruct; | ||
329 | GSList *pitem; | ||
330 | |||
331 | sdata = g_new0(BlendSdnaData, 1); | ||
332 | sdata->sstruct = sstruct; | ||
333 | sdata->prophash = g_hash_table_new(g_str_hash, g_str_equal); | ||
334 | |||
335 | #if DEBUG > BLEND_DEBUG_STRUCT | ||
336 | g_debug("|%s{ /* %s */", | ||
337 | debug_pad(level * 2), sstruct->name); | ||
338 | #endif | ||
339 | |||
340 | for(pitem = sstruct->properties; pitem != NULL; pitem = pitem->next) { | ||
341 | sprop = pitem->data; | ||
342 | spdata = g_new0(BlendSdnaPropData, 1); | ||
343 | spdata->name = g_strdup(sprop->name); | ||
344 | spdata->sprop = sprop; | ||
345 | g_hash_table_insert(sdata->prophash, spdata->name, spdata); | ||
346 | spdata->type = (sprop->tid < 10) ? sprop->tid : 0xFF; | ||
347 | |||
348 | if(sprop->ptr) { | ||
349 | spdata->pval = g_new0(guint32, 1); | ||
350 | spdata->pval[0] = g3d_stream_read_int32_le(global->stream); | ||
351 | (*r) -= 4; | ||
352 | #if DEBUG > BLEND_DEBUG_STRUCT | ||
353 | g_debug("|%s %-10s %-10s = 0x%08x; /* len = %d */", | ||
354 | debug_pad(level * 2), | ||
355 | sprop->tname, sprop->name, spdata->pval[0], *r); | ||
356 | #endif | ||
357 | continue; | ||
358 | } | ||
359 | |||
360 | if(spdata->type == T_STRUCT) { | ||
361 | substruct = blend_sdna_get_struct_by_tid(sdna, sprop->tid); | ||
362 | #if DEBUG > BLEND_DEBUG_STRUCT | ||
363 | g_debug("|%s %-10s %-10s = /* %s */", | ||
364 | debug_pad(level * 2), | ||
365 | sprop->tname, sprop->name, | ||
366 | substruct ? substruct->name : "(unknown)"); | ||
367 | #endif | ||
368 | if(substruct) | ||
369 | spdata->structval = blend_sdna_data_read(sdna, | ||
370 | substruct, global, r, level + 1); | ||
371 | else { | ||
372 | g3d_stream_skip(global->stream, sprop->tsize); | ||
373 | (*r) -= sprop->tsize; | ||
374 | } | ||
375 | } else { | ||
376 | sdna_data_read_basic_types(sdna, spdata, global, r); | ||
377 | } | ||
378 | } /* properties */ | ||
379 | |||
380 | #if DEBUG > BLEND_DEBUG_STRUCT | ||
381 | g_debug("|%s};", debug_pad(level * 2)); | ||
382 | #endif | ||
383 | |||
384 | return sdata; | ||
385 | } | ||
386 | |||
387 | void blend_sdna_data_free(BlendSdnaData *sdata) | ||
388 | { | ||
389 | /* TODO: free BlendSdnaPropData nodes */ | ||
390 | g_hash_table_destroy(sdata->prophash); | ||
391 | g_free(sdata); | ||
392 | } | ||
393 | |||
394 | /*****************************************************************************/ | ||
395 | /* debugging code */ | ||
396 | |||
397 | #if DEBUG > 0 | ||
398 | |||
399 | static void blend_sdna_dump_spdata_cb(gpointer key, gpointer value, | ||
400 | gpointer user_data) | ||
401 | { | ||
402 | BlendSdnaPropData *spdata = value; | ||
403 | guint32 *levelp = user_data; | ||
404 | |||
405 | #define DUMP_FORMAT "|%s %-10s %-10s [%03d]" | ||
406 | #define DUMP_ARGS debug_pad(*levelp), \ | ||
407 | spdata->sprop->tname, spdata->name, spdata->sprop->nitems | ||
408 | |||
409 | if(spdata->sprop->ptr) { | ||
410 | g_debug(DUMP_FORMAT " = 0x%08x;", DUMP_ARGS, spdata->pval[0]); | ||
411 | return; | ||
412 | } | ||
413 | switch(spdata->type) { | ||
414 | case T_CHAR: | ||
415 | case T_SHORT: | ||
416 | case T_INT: | ||
417 | case T_LONG: | ||
418 | g_debug(DUMP_FORMAT " = %i;", DUMP_ARGS, spdata->ival[0]); | ||
419 | break; | ||
420 | case T_UCHAR: | ||
421 | case T_USHORT: | ||
422 | case T_ULONG: | ||
423 | g_debug(DUMP_FORMAT " = %u;", DUMP_ARGS, spdata->uval[0]); | ||
424 | break; | ||
425 | case T_FLOAT: | ||
426 | case T_DOUBLE: | ||
427 | g_debug(DUMP_FORMAT " = %f;", DUMP_ARGS, spdata->fval[0]); | ||
428 | break; | ||
429 | case T_STRUCT: | ||
430 | g_debug(DUMP_FORMAT " =", DUMP_ARGS); | ||
431 | blend_sdna_dump_data(spdata->structval, *levelp + 1); | ||
432 | break; | ||
433 | default: | ||
434 | g_debug(DUMP_FORMAT ";", DUMP_ARGS); | ||
435 | break; | ||
436 | } | ||
437 | } | ||
438 | |||
439 | gboolean blend_sdna_dump_data(BlendSdnaData *sdata, guint32 level) | ||
440 | { | ||
441 | g_debug("|%s{ /* %s */", debug_pad(level), sdata->sstruct->name); | ||
442 | g_hash_table_foreach(sdata->prophash, blend_sdna_dump_spdata_cb, &level); | ||
443 | g_debug("|%s},", debug_pad(level)); | ||
444 | return TRUE; | ||
445 | } | ||
446 | |||
447 | gboolean blend_sdna_dump_struct(BlendSdna *sdna, guint32 sdnanr) | ||
448 | { | ||
449 | const BlendSdnaStruct *sstruct; | ||
450 | BlendSdnaProperty *sprop; | ||
451 | GSList *pitem; | ||
452 | |||
453 | sstruct = blend_sdna_get_struct_by_id(sdna, sdnanr); | ||
454 | if(!sstruct) | ||
455 | return FALSE; | ||
456 | sstruct = g_slist_nth_data(sdna->structs, sdnanr); | ||
457 | g_debug("| struct %s { /* %d */", sstruct->name, sstruct->size); | ||
458 | for(pitem = sstruct->properties; pitem != NULL; pitem = pitem->next) { | ||
459 | sprop = pitem->data; | ||
460 | g_debug("| \t%-16s %-24s;", sprop->tname, sprop->name); | ||
461 | } | ||
462 | g_debug("| };"); | ||
463 | |||
464 | return TRUE; | ||
465 | } | ||
466 | |||
467 | #endif | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_sdna.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_sdna.h new file mode 100644 index 0000000..a95369f --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_sdna.h | |||
@@ -0,0 +1,53 @@ | |||
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_BLEND_SDNA_H | ||
23 | #define _IMP_BLEND_SDNA_H | ||
24 | |||
25 | #include <g3d/stream.h> | ||
26 | |||
27 | #include "imp_blend_types.h" | ||
28 | |||
29 | /* as in #if DEBUG > BLEND_DEBUG_STRUCT */ | ||
30 | #define BLEND_DEBUG_STRUCT 1 | ||
31 | |||
32 | BlendSdna *blend_sdna_read_dna1(G3DStream *stream, guint32 flags, gint32 len); | ||
33 | void blend_sdna_cleanup(BlendSdna *sdna); | ||
34 | |||
35 | const BlendSdnaStruct *blend_sdna_get_struct_by_id(BlendSdna *sdna, | ||
36 | guint32 sdnanr); | ||
37 | const BlendSdnaStruct *blend_sdna_get_struct_by_name(BlendSdna *sdna, | ||
38 | const gchar *name); | ||
39 | |||
40 | BlendSdnaData *blend_sdna_data_read(BlendSdna *sdna, | ||
41 | const BlendSdnaStruct *sstruct, BlendGlobal *global, gsize *r, | ||
42 | guint32 level); | ||
43 | void blend_sdna_data_free(BlendSdnaData *sdata); | ||
44 | |||
45 | BlendSdnaPropData *blend_sdna_get_property(BlendSdnaData *sdata, | ||
46 | const gchar *name, BlendSdnaPropType type); | ||
47 | |||
48 | #if DEBUG > 0 | ||
49 | gboolean blend_sdna_dump_data(BlendSdnaData *sdata, guint32 level); | ||
50 | gboolean blend_sdna_dump_struct(BlendSdna *sdna, guint32 sdnanr); | ||
51 | #endif | ||
52 | |||
53 | #endif /* _IMP_BLEND_SDNA_H */ | ||
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h new file mode 100644 index 0000000..b2d9573 --- /dev/null +++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_blend/imp_blend_types.h | |||
@@ -0,0 +1,100 @@ | |||
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_BLEND_TYPES_H | ||
23 | #define _IMP_BLEND_TYPES_H | ||
24 | |||
25 | #include <g3d/types.h> | ||
26 | |||
27 | typedef struct { | ||
28 | gchar *name; | ||
29 | const gchar *tname; | ||
30 | guint32 tid; | ||
31 | gsize tsize; | ||
32 | gsize nitems; | ||
33 | gboolean ptr; | ||
34 | } BlendSdnaProperty; | ||
35 | |||
36 | typedef struct { | ||
37 | const gchar *name; | ||
38 | guint32 tid; | ||
39 | gsize size; | ||
40 | GSList *properties; | ||
41 | } BlendSdnaStruct; | ||
42 | |||
43 | typedef struct { | ||
44 | const BlendSdnaStruct *sstruct; | ||
45 | GHashTable *prophash; | ||
46 | } BlendSdnaData; | ||
47 | |||
48 | typedef enum { | ||
49 | T_CHAR = 0, | ||
50 | T_UCHAR = 1, | ||
51 | T_SHORT = 2, | ||
52 | T_USHORT = 3, | ||
53 | T_INT = 4, | ||
54 | T_LONG = 5, | ||
55 | T_ULONG = 6, | ||
56 | T_FLOAT = 7, | ||
57 | T_DOUBLE = 8, | ||
58 | T_VOID = 9, | ||
59 | T_STRUCT = 0xFF | ||
60 | } BlendSdnaPropType; | ||
61 | |||
62 | typedef struct { | ||
63 | gchar *name; | ||
64 | BlendSdnaPropType type; | ||
65 | BlendSdnaProperty *sprop; | ||
66 | guint32 *uval; /* unsigned integer value */ | ||
67 | gint32 *ival; /* signed integer value */ | ||
68 | G3DFloat *fval; /* floating point value */ | ||
69 | guint32 *pval; /* pointer value */ | ||
70 | BlendSdnaData *structval; /* struct value */ | ||
71 | } BlendSdnaPropData; | ||
72 | |||
73 | typedef struct { | ||
74 | guint32 n_names; | ||
75 | gchar **names; | ||
76 | guint32 n_types; | ||
77 | gchar **type_names; | ||
78 | guint32 *type_sizes; | ||
79 | GSList *structs; | ||
80 | } BlendSdna; | ||
81 | |||
82 | typedef struct { | ||
83 | G3DContext *context; | ||
84 | G3DModel *model; | ||
85 | G3DStream *stream; | ||
86 | guint32 flags; | ||
87 | BlendSdna *sdna; | ||
88 | } BlendGlobal; | ||
89 | |||
90 | typedef struct { | ||
91 | guint32 id; | ||
92 | guint32 len; | ||
93 | G3DObject *object; | ||
94 | G3DObject *grpobject; | ||
95 | guint32 object_id; | ||
96 | guint32 ndata; | ||
97 | BlendSdnaData **data; | ||
98 | } BlendLocal; | ||
99 | |||
100 | #endif | ||