[Hdrflow-svn] SF.net SVN: hdrflow: [264] trunk/lib/extras
Status: Pre-Alpha
Brought to you by:
glslang
|
From: <gl...@us...> - 2007-08-24 20:02:50
|
Revision: 264
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=264&view=rev
Author: glslang
Date: 2007-08-24 13:02:47 -0700 (Fri, 24 Aug 2007)
Log Message:
-----------
+maya initial image reader
Modified Paths:
--------------
trunk/lib/extras/configure.ac
trunk/lib/extras/src/imf/Makefile.am
trunk/lib/extras/src/imf/hdr/Makefile.am
trunk/lib/extras/src/imf/imf_common.cpp
Added Paths:
-----------
trunk/lib/extras/src/imf/mfn/
trunk/lib/extras/src/imf/mfn/Makefile.am
trunk/lib/extras/src/imf/mfn/mfn.cpp
Modified: trunk/lib/extras/configure.ac
===================================================================
--- trunk/lib/extras/configure.ac 2007-08-21 18:59:11 UTC (rev 263)
+++ trunk/lib/extras/configure.ac 2007-08-24 20:02:47 UTC (rev 264)
@@ -174,6 +174,7 @@
src/Makefile
src/imf/Makefile
src/imf/hdr/Makefile
+src/imf/mfn/Makefile
src/panoramic/Makefile
src/raw/Makefile
])
Modified: trunk/lib/extras/src/imf/Makefile.am
===================================================================
--- trunk/lib/extras/src/imf/Makefile.am 2007-08-21 18:59:11 UTC (rev 263)
+++ trunk/lib/extras/src/imf/Makefile.am 2007-08-24 20:02:47 UTC (rev 264)
@@ -3,5 +3,5 @@
#
#
-SUBDIRS = hdr
+SUBDIRS = hdr mfn
Modified: trunk/lib/extras/src/imf/hdr/Makefile.am
===================================================================
--- trunk/lib/extras/src/imf/hdr/Makefile.am 2007-08-21 18:59:11 UTC (rev 263)
+++ trunk/lib/extras/src/imf/hdr/Makefile.am 2007-08-24 20:02:47 UTC (rev 264)
@@ -17,10 +17,11 @@
libhdrflow_extras_imfhdr_la_CXXFLAGS = \
$(BOOST_INCLUDE_PATH) \
$(MAYA_CXXFLAGS) \
- -I$(top_buiddir)/../openlibraries/src
+ -I$(top_builddir)/../openlibraries/src
libhdrflow_extras_imfhdr_la_LIBADD = \
- $(MAYA_LIBS)
+ $(MAYA_LIBS) \
+ $(top_builddir)/../openlibraries/src/openpluginlib/pl/libopenpluginlib_pl.la
libhdrflow_extras_imfhdr_la_LDFLAGS = \
$(MAYA_LDFLAGS)
Modified: trunk/lib/extras/src/imf/imf_common.cpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.cpp 2007-08-21 18:59:11 UTC (rev 263)
+++ trunk/lib/extras/src/imf/imf_common.cpp 2007-08-24 20:02:47 UTC (rev 264)
@@ -9,17 +9,55 @@
#include <imf/imf_common.hpp>
+#include <openpluginlib/pl/openpluginlib.hpp>
+#include <openpluginlib/pl/utf8_utils.hpp>
+
+namespace pl = olib::openpluginlib;
+
namespace hdrflow { namespace extras { namespace imf {
+namespace
+{
+ struct query_traits
+ {
+ explicit query_traits( const pl::wstring& to_match )
+ : to_match_( to_match )
+ { }
+
+ pl::wstring libname( ) const
+ { return L""; }
+
+ pl::wstring to_match( ) const
+ { return to_match_; }
+
+ pl::wstring type( ) const
+ { return L""; }
+
+ int merit( ) const
+ { return 0; }
+
+ pl::wstring to_match_;
+ };
+}
+
int image_init( const std::string& msg )
{
ERR_printf( ERR__INFO, const_cast<char*>( msg.c_str( ) ) );
+ pl::init( );
+
return TRUE;
}
BOOLEAN image_is_file( char* fn, FILE* fp )
{
+ typedef pl::discovery<query_traits> discovery;
+
+ discovery plugins( query_traits( pl::to_wstring( fn ) ) );
+ if( !plugins.empty( ) )
+ return TRUE;
+
+ ERR_printf( ERR__ERROR, "can't recognise %s.", fn );
return FALSE;
}
@@ -27,13 +65,16 @@
{
imf__err = IMF_C_READ_ERR;
+
+ ERR_printf( ERR__ERROR, "can't read file." );
return FALSE;
}
int image_write_open( IMF_OBJECT* imf )
{
imf__err = IMF_C_WRITE_ERR;
-
+
+ ERR_printf( ERR__ERROR, "can't write file." );
return FALSE;
}
Added: trunk/lib/extras/src/imf/mfn/Makefile.am
===================================================================
--- trunk/lib/extras/src/imf/mfn/Makefile.am (rev 0)
+++ trunk/lib/extras/src/imf/mfn/Makefile.am 2007-08-24 20:02:47 UTC (rev 264)
@@ -0,0 +1,28 @@
+
+#
+#
+#
+
+libdir = $(EXTRAS_PLUGINPATH)
+
+if HAVE_MAYA
+
+lib_LTLIBRARIES = libhdrflow_extras_mfn.la
+
+libhdrflow_extras_mfn_la_SOURCES = \
+ mfn.cpp
+
+libhdrflow_extras_mfn_la_CXXFLAGS = \
+ $(BOOST_INCLUDE_PATH) \
+ $(MAYA_CXXFLAGS) \
+ -I$(top_builddir)/../openlibraries/src
+
+libhdrflow_extras_mfn_la_LIBADD = \
+ $(MAYA_LIBS) \
+ $(top_builddir)/../openlibraries/src/openpluginlib/pl/libopenpluginlib_pl.la
+
+libhdrflow_extras_mfn_la_LDFLAGS = \
+ $(MAYA_LDFLAGS)
+
+endif
+
Property changes on: trunk/lib/extras/src/imf/mfn/Makefile.am
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/imf/mfn/mfn.cpp
===================================================================
--- trunk/lib/extras/src/imf/mfn/mfn.cpp (rev 0)
+++ trunk/lib/extras/src/imf/mfn/mfn.cpp 2007-08-24 20:02:47 UTC (rev 264)
@@ -0,0 +1,7 @@
+
+// mfn - Autodesk's Maya import/export image plugin
+
+// Copyright (c) 2007 Goncalo N. M. de Carvalho
+// Released under the GPL.
+// For more information, see http://www.cryogenicgraphics.com/hdrflow.
+
Property changes on: trunk/lib/extras/src/imf/mfn/mfn.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|