Panda3D
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions

MayaApi Class Reference

This class presents a wrapper around the global Maya interface. More...

#include "mayaApi.h"

Inheritance diagram for MayaApi:
ReferenceCount MemoryBase

List of all members.

Public Member Functions

bool clear ()
 Resets the global model space to the empty state, for instance in preparation for building a new file.
CoordinateSystem get_coordinate_system ()
 Returns Maya's internal coordinate system in effect.
DistanceUnit get_units ()
 Returns Maya's internal units in effect.
bool is_valid () const
 Returns true if the API has been successfully opened and may be used, or false if there is some problem.
bool read (const Filename &filename)
 Reads the indicated maya file into the global model space.
void set_units (DistanceUnit unit)
 Set Maya's UI units.
bool write (const Filename &filename)
 Writes the global model space to the indicated file.

Static Public Member Functions

static PT (MayaApi) open_api(string program_name

Public Attributes

static bool bool revertdir = true)
static bool view_license = false

Protected Member Functions

 MayaApi (const string &program_name, bool view_license=false, bool revertdir=true)
 Don't attempt to create this object directly; instead, use the open_api() method.
 MayaApi (const MayaApi &copy)
 Don't attempt to copy MayaApi objects.
void operator= (const MayaApi &copy)
 Don't attempt to copy MayaApi objects.

Detailed Description

This class presents a wrapper around the global Maya interface.

While the reference count is held, it keeps the Maya interface open, and closes the interface when the object destructs.

Definition at line 33 of file mayaApi.h.


Constructor & Destructor Documentation

MayaApi::MayaApi ( const string &  program_name,
bool  view_license = false,
bool  revertdir = true 
) [protected]

Don't attempt to create this object directly; instead, use the open_api() method.

Definition at line 47 of file mayaApi.cxx.

References ExecutionEnvironment::get_cwd(), and Thread::sleep().

MayaApi::MayaApi ( const MayaApi copy) [protected]

Don't attempt to copy MayaApi objects.

There should be only one of these in the world at a time.

Definition at line 110 of file mayaApi.cxx.


Member Function Documentation

bool MayaApi::clear ( void  )

Resets the global model space to the empty state, for instance in preparation for building a new file.

Returns true if successful, false otherwise.

Definition at line 356 of file mayaApi.cxx.

CoordinateSystem MayaApi::get_coordinate_system ( )

Returns Maya's internal coordinate system in effect.

Definition at line 439 of file mayaApi.cxx.

DistanceUnit MayaApi::get_units ( )

Returns Maya's internal units in effect.

Definition at line 371 of file mayaApi.cxx.

bool MayaApi::is_valid ( ) const

Returns true if the API has been successfully opened and may be used, or false if there is some problem.

Definition at line 239 of file mayaApi.cxx.

void MayaApi::operator= ( const MayaApi copy) [protected]

Don't attempt to copy MayaApi objects.

There should be only one of these in the world at a time.

Definition at line 121 of file mayaApi.cxx.

bool MayaApi::read ( const Filename filename)

Reads the indicated maya file into the global model space.

Returns true if successful, false otherwise.

Definition at line 265 of file mayaApi.cxx.

void MayaApi::set_units ( DistanceUnit  unit)

Set Maya's UI units.

Definition at line 401 of file mayaApi.cxx.

bool MayaApi::write ( const Filename filename)

Writes the global model space to the indicated file.

Returns true if successful, false otherwise.

Definition at line 310 of file mayaApi.cxx.

References Filename::get_extension().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations