DD::Image::ReadGeo Class Reference

Inherits DD::Image::SourceGeo, DD::Image::FileRead, and DD::Image::FileOp.

List of all members.

Public Member Functions

 ReadGeo (Node *node)
virtual Opop ()
virtual FileHandler * handler () const
virtual const char * getFilename () const
virtual const char * file_type () const
void close ()
void filename (const char *f)
const char * filename () const
virtual const char * fname () const
virtual bool readTextureWCoord ()
int update_mode () const
int full_geometry_frame () const
int expected_first_frame () const
void expected_first_frame (int v)
int expected_last_frame () const
void expected_last_frame (int v)
virtual void knobs (Knob_Callback)
int knob_changed (Knob *k)
 The will handle the knob changes.
void internalError (const char *fmt,...)
const char * Class () const
const char * node_help () const

Static Public Attributes

static const char * kFileKnobName
static const char * kReloadKnobName
static const char * kVersionKnobName
static const Description d

Protected Member Functions

void make_format ()
void _validate (bool)
void geometry_engine (Scene &, GeometryList &out)
 Apply the concat matrix to all the GeoInfos.
void get_geometry_hash ()
void create_geometry (Scene &, GeometryList &out)
void _close ()
ReadGeofirstRead ()
const ReadGeofirstRead () const

Protected Attributes

Matrix4 _local
bool _readTextureWCoord
Knob_pAxisKnob

Static Protected Attributes

static const char * _tried_plugin

Detailed Description

Returns geometry from the outside world. The geometry is identified by the filename (which may just be a string interpreted by one of the reader implementations and not an actual file on the disk).

All the work is done by the various subclasses of GeoReader. ReadGeo just chooses what subclass to instantiate and returns the output from it, and correctly destroys and instantiates new ones as needed.


Member Function Documentation

void ReadGeo::_validate ( bool  for_real) [protected, virtual]

validate() will destroy any previous GeoReader and open a new one if the filename has changed or the version number has changed (the version number is incremented by the refresh button).

After opening the file, it copies the info_ from the Reader object. This will have been initialized with expected_first_frame(), expected_last_frame(), expected_format(), and expected_full_size_format(), but the Reader subclass may have changed this information.

For Nuke, this may be called with for_real set to false. If expected_format() and expected_full_size_format() are not null then no attempt is made to open the file and the the previous info_ is set to those formats and returned otherwise unchanged. This is done to avoid the overhead of opening image files that will not be used. Later when data is needed this is called again with for_real true, the file is really opened and the real info is determined.

Reimplemented from DD::Image::GeoOp.

References _close(), DD::Image::Knob::get_text(), DD::Image::Op::knob(), DD::Image::Op::outputContext(), DD::Image::Hash::reset(), DD::Image::Op::uiContext(), and DD::Image::Op::validate().

void ReadGeo::get_geometry_hash ( ) [protected, virtual]

Changes geometry hash by the filename. Use file date as well..?

Reimplemented from DD::Image::SourceGeo.

References DD::Image::Matrix4::array(), DD::Image::GeoOp::geo_hash, and DD::Image::GeoReader::get_geometry_hash().

void ReadGeo::_close ( ) [protected, virtual]

Call this to close any current file. Besides freeing up resources, this can be used to make validate() check for the existence of a new file and prevent an error if the dimensions change.

Reimplemented from DD::Image::Op.

Referenced by _validate().

virtual bool DD::Image::ReadGeo::readTextureWCoord ( ) [inline, virtual]

read texture texture w coord

void ReadGeo::internalError ( const char *  fmt,
  ... 
)

Normally calls Op::error(), but prefixes "filename: " to the message.

Reimplemented from DD::Image::FileOp.

References DD::Image::Op::error(), strlcpy(), and vsnprintf().