This class presents a wrapper around the global Maya interface. More...
#include "mayaApi.h"
Public Member Functions | |
bool | clear () |
Resets the global model space to the empty state, for instance in preparation for building a new file. More... | |
CoordinateSystem | get_coordinate_system () |
Returns Maya's internal coordinate system in effect. More... | |
DistanceUnit | get_units () |
Returns Maya's internal units in effect. More... | |
bool | read (const Filename &filename) |
Reads the indicated maya file into the global model space. More... | |
void | set_units (DistanceUnit unit) |
Set Maya's UI units. More... | |
bool | write (const Filename &filename) |
Writes the global model space to the indicated file. More... | |
Public Member Functions inherited from ReferenceCount | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ReferenceCount | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes inherited from ReferenceCount | |
get_ref_count | |
Returns the current reference count. More... | |
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.
bool MayaApi::clear | ( | ) |
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 336 of file mayaApi.cxx.
CoordinateSystem MayaApi::get_coordinate_system | ( | ) |
Returns Maya's internal coordinate system in effect.
Definition at line 413 of file mayaApi.cxx.
DistanceUnit MayaApi::get_units | ( | ) |
Returns Maya's internal units in effect.
Definition at line 349 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 249 of file mayaApi.cxx.
References Filename::to_os_generic(), and Filename::to_os_specific().
void MayaApi::set_units | ( | DistanceUnit | unit | ) |
Set Maya's UI units.
Definition at line 377 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 292 of file mayaApi.cxx.
References Filename::get_extension(), Filename::to_os_generic(), and Filename::to_os_specific().