DD::Image::ReadGeo Class Reference

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

List of all members.

Public Member Functions

 ReadGeo (Node *node)
void close ()
const char * getFilename () const
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)
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 Description d

Protected Member Functions

void _validate (bool)
void geometry_engine (Scene &, GeometryList &out)
void get_geometry_hash ()
void create_geometry (Scene &, GeometryList &out)
void _close ()


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::Hash::append(), DD::Image::Knob::get_text(), DD::Image::Op::knob(), DD::Image::Op::outputContext(), DD::Image::Hash::reset(), DD::Image::OutputContext::setFrame(), DD::Image::Op::uiContext(), and DD::Image::Op::validate().

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

void ReadGeo::create_geometry ( Scene scene,
GeometryList out 
) [protected, virtual]

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().

const char * ReadGeo::fname (  )  const [virtual]

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

read texture texture w coord

int ReadGeo::knob_changed ( Knob k  )  [virtual]

The will handle the knob changes.

The will handle the knob changes.

Reimplemented from DD::Image::GeoOp.

References DD::Image::Knob::disable(), DD::Image::Knob::enable(), and DD::Image::Knob::name().

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

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

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



©2009 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.thefoundry.co.uk