[Hdrflow-svn] SF.net SVN: hdrflow: [259] trunk/lib/extras/src/imf
Status: Pre-Alpha
Brought to you by:
glslang
|
From: <gl...@us...> - 2007-08-20 21:05:03
|
Revision: 259
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=259&view=rev
Author: glslang
Date: 2007-08-20 14:04:59 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
+ common maya plugin files
Modified Paths:
--------------
trunk/lib/extras/src/imf/Makefile.am
Added Paths:
-----------
trunk/lib/extras/src/imf/hdr/
trunk/lib/extras/src/imf/hdr/Makefile.am
trunk/lib/extras/src/imf/hdr/hdr.cpp
trunk/lib/extras/src/imf/imf_common.cpp
trunk/lib/extras/src/imf/imf_common.hpp
Removed Paths:
-------------
trunk/lib/extras/src/imf/imf.cpp
Modified: trunk/lib/extras/src/imf/Makefile.am
===================================================================
--- trunk/lib/extras/src/imf/Makefile.am 2007-08-19 16:45:38 UTC (rev 258)
+++ trunk/lib/extras/src/imf/Makefile.am 2007-08-20 21:04:59 UTC (rev 259)
@@ -3,25 +3,5 @@
#
#
-libdir = $(EXTRAS_PLUGINPATH)
+SUBDIRS = hdr
-if HAVE_MAYA
-
-lib_LTLIBRARIES = libhdrflow_extras_imf.la
-
-libhdrflow_extras_imf_la_SOURCES = \
- imf.cpp
-
-libhdrflow_extras_imf_la_CXXFLAGS = \
- $(BOOST_INCLUDE_PATH) \
- $(MAYA_CXXFLAGS) \
- -I$(top_buiddir)/../openlibraries/src
-
-libhdrflow_extras_imf_la_LIBADD = \
- $(MAYA_LIBS)
-
-libhdrflow_extras_imf_la_LDFLAGS = \
- $(MAYA_LDFLAGS)
-
-endif
-
Added: trunk/lib/extras/src/imf/hdr/Makefile.am
===================================================================
--- trunk/lib/extras/src/imf/hdr/Makefile.am (rev 0)
+++ trunk/lib/extras/src/imf/hdr/Makefile.am 2007-08-20 21:04:59 UTC (rev 259)
@@ -0,0 +1,29 @@
+
+#
+#
+#
+
+libdir = $(EXTRAS_PLUGINPATH)
+
+if HAVE_MAYA
+
+lib_LTLIBRARIES = libhdrflow_extras_imfhdr.la
+
+libhdrflow_extras_imfhdr_la_SOURCES = \
+ hdr.cpp \
+ ../imf_common.hpp \
+ ../imf_common.cpp
+
+libhdrflow_extras_imfhdr_la_CXXFLAGS = \
+ $(BOOST_INCLUDE_PATH) \
+ $(MAYA_CXXFLAGS) \
+ -I$(top_buiddir)/../openlibraries/src
+
+libhdrflow_extras_imfhdr_la_LIBADD = \
+ $(MAYA_LIBS)
+
+libhdrflow_extras_imfhdr_la_LDFLAGS = \
+ $(MAYA_LDFLAGS)
+
+endif
+
Property changes on: trunk/lib/extras/src/imf/hdr/Makefile.am
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/imf/hdr/hdr.cpp
===================================================================
--- trunk/lib/extras/src/imf/hdr/hdr.cpp (rev 0)
+++ trunk/lib/extras/src/imf/hdr/hdr.cpp 2007-08-20 21:04:59 UTC (rev 259)
@@ -0,0 +1,43 @@
+
+// imf - 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.
+
+#include <cstdio>
+
+#include <imf/imf_common.hpp>
+
+namespace imf = hdrflow::extras::imf;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Mandatory entry points
+IMF_VAR_ENTRY_POINTS( "com.cryogenicgraphics.hdr", "HDRFlow HDR", ".hdr" )
+
+int imageInit( void )
+{
+ return imf::image_init( );
+}
+
+BOOLEAN imageIsFile( char* fn, FILE* fp )
+{
+ return imf::image_is_file( fn, fp );
+}
+
+int imageReadOpen( IMF_OBJECT* imf )
+{
+ return imf::image_read_open( imf );
+}
+
+int imageWriteOpen( IMF_OBJECT* imf )
+{
+ return imf::image_write_open( imf );
+}
+
+#ifdef __cplusplus
+}
+#endif
Property changes on: trunk/lib/extras/src/imf/hdr/hdr.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
Deleted: trunk/lib/extras/src/imf/imf.cpp
===================================================================
--- trunk/lib/extras/src/imf/imf.cpp 2007-08-19 16:45:38 UTC (rev 258)
+++ trunk/lib/extras/src/imf/imf.cpp 2007-08-20 21:04:59 UTC (rev 259)
@@ -1,68 +0,0 @@
-
-// imf - 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.
-
-#include <cstdio>
-
-#include <maya/IMF.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Mandatory entry points
-
-char* program = "Wavefront";
-char* version = IMF_PROTOCOL_CURRENT;
-char* type = "image";
-char* imageKey = "com.cryogenicgraphics.dpx";
-char* imageName = "HDRFlow DPX";
-char* imageExtension = ".dpx";
-char* imageFormatString = "%s.%04.4d%s";
-char* imageNameSyntax = "Name.####.Ext";
-int imageAddExtension = TRUE;
-int imageUsage = IMF_C_GENERIC;
-int imageOrientation = IMF_C_ORIENT_BOT_LEFT;
-int imageNumberOfLuts = 0;
-U_INT imageBitsPerLut = 0x00000000;
-int imageNumberOfChannels = 4;
-U_INT imageBitsPerChannel = 0x00000080;
-int imageNumberOfMattes = 0;
-U_INT imageBitsPerMatte = 0x00000000;
-int imageNumberOfZChannels = 0;
-U_INT imageBitsPerZChannel = 0x00000000;
-int imageSupportsActiveWindow = FALSE;
-U_INT imageAccess = IMF_C_READ_RANDOM | IMF_C_WRITE;
-
-int imageInit( void )
-{
- ERR_printf( ERR__INFO, "HDRFlow DPX plugin initialised\n" );
-
- return TRUE;
-}
-
-BOOLEAN imageIsFile( char* fn, FILE* fp )
-{
- return FALSE;
-}
-
-int imageReadOpen( IMF_OBJECT* imf )
-{
- imf__err = IMF_C_READ_ERR;
-
- return FALSE;
-}
-
-int imageWriteOpen( IMF_OBJECT* imf )
-{
- imf__err = IMF_C_WRITE_ERR;
-
- return FALSE;
-}
-
-#ifdef __cplusplus
-}
-#endif
Added: trunk/lib/extras/src/imf/imf_common.cpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.cpp (rev 0)
+++ trunk/lib/extras/src/imf/imf_common.cpp 2007-08-20 21:04:59 UTC (rev 259)
@@ -0,0 +1,40 @@
+
+// imf - 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.
+
+#include <cstdio>
+
+#include <imf/imf_common.hpp>
+
+namespace hdrflow { namespace extras { namespace imf {
+
+int image_init( void )
+{
+ ERR_printf( ERR__INFO, "HDRFlow DPX plugin initialised\n" );
+
+ return TRUE;
+}
+
+BOOLEAN image_is_file( char* fn, FILE* fp )
+{
+ return FALSE;
+}
+
+int image_read_open( IMF_OBJECT* imf )
+{
+ imf__err = IMF_C_READ_ERR;
+
+ return FALSE;
+}
+
+int image_write_open( IMF_OBJECT* imf )
+{
+ imf__err = IMF_C_WRITE_ERR;
+
+ return FALSE;
+}
+
+} } }
Property changes on: trunk/lib/extras/src/imf/imf_common.cpp
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/lib/extras/src/imf/imf_common.hpp
===================================================================
--- trunk/lib/extras/src/imf/imf_common.hpp (rev 0)
+++ trunk/lib/extras/src/imf/imf_common.hpp 2007-08-20 21:04:59 UTC (rev 259)
@@ -0,0 +1,45 @@
+
+// imf - 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.
+
+#ifndef IMF_COMMON_INC_
+#define IMF_COMMON_INC_
+
+#include <maya/IMF.h>
+
+namespace hdrflow { namespace extras { namespace imf {
+
+#define IMF_VAR_ENTRY_POINTS( key, name, extension ) \
+ char* program = "Wavefront"; \
+ char* version = IMF_PROTOCOL_CURRENT; \
+ char* type = "image"; \
+ char* imageKey = key; \
+ char* imageName = name; \
+ char* imageExtension = extension; \
+ char* imageFormatString = "%s.%04.4d%s"; \
+ char* imageNameSyntax = "Name.####.Ext"; \
+ int imageAddExtension = TRUE; \
+ int imageUsage = IMF_C_GENERIC; \
+ int imageOrientation = IMF_C_ORIENT_BOT_LEFT; \
+ int imageNumberOfLuts = 0; \
+ U_INT imageBitsPerLut = 0x00000000; \
+ int imageNumberOfChannels = 4; \
+ U_INT imageBitsPerChannel = 0x00000080; \
+ int imageNumberOfMattes = 0; \
+ U_INT imageBitsPerMatte = 0x00000000; \
+ int imageNumberOfZChannels = 0; \
+ U_INT imageBitsPerZChannel = 0x00000000; \
+ int imageSupportsActiveWindow = FALSE; \
+ U_INT imageAccess = IMF_C_READ_RANDOM | IMF_C_WRITE;
+
+int image_init( void );
+BOOLEAN image_is_file( char* fn, FILE* fp );
+int image_read_open( IMF_OBJECT* imf );
+int image_write_open( IMF_OBJECT* imf );
+
+} } }
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|