Panda3D
|
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 | is_valid () const |
Returns true if the API has been successfully opened and may be used, or false if there is some problem. 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... | |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
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 | 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... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Static Public Member Functions | |
static | PT (MayaApi) open_api(string program_name |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
static bool bool | revertdir = true) |
static bool | view_license = false |
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 | ( | 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 357 of file mayaApi.cxx.
References get_units().
Referenced by write().
CoordinateSystem MayaApi::get_coordinate_system | ( | ) |
Returns Maya's internal coordinate system in effect.
Definition at line 440 of file mayaApi.cxx.
Referenced by set_units().
DistanceUnit MayaApi::get_units | ( | ) |
Returns Maya's internal units in effect.
Definition at line 372 of file mayaApi.cxx.
References set_units().
Referenced by clear().
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 240 of file mayaApi.cxx.
References read().
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 266 of file mayaApi.cxx.
References Filename::to_os_generic(), Filename::to_os_specific(), and write().
Referenced by is_valid().
void MayaApi::set_units | ( | DistanceUnit | unit | ) |
Set Maya's UI units.
Definition at line 402 of file mayaApi.cxx.
References get_coordinate_system().
Referenced by get_units().
bool MayaApi::write | ( | const Filename & | filename | ) |
Writes the global model space to the indicated file.
Returns true if successful, false otherwise.
Definition at line 311 of file mayaApi.cxx.
References clear(), Filename::get_extension(), Filename::to_os_generic(), and Filename::to_os_specific().
Referenced by read().