Panda3D
Functions
maya_funcs.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "maya_funcs.h"
#include "pre_maya_include.h"
#include <maya/MObject.h>
#include <maya/MAngle.h>
#include <maya/MFnDependencyNode.h>
#include <maya/MStatus.h>
#include <maya/MFnStringData.h>
#include <maya/MFnNumericData.h>
#include <maya/MPlugArray.h>
#include <maya/MPlug.h>
#include <maya/MFnAttribute.h>
#include <maya/MFnTypedAttribute.h>
#include <maya/MFnNumericAttribute.h>
#include <maya/MFnEnumAttribute.h>
#include <maya/MFnCompoundAttribute.h>
#include <maya/MFnMatrixData.h>
#include <maya/MMatrix.h>
#include "post_maya_include.h"

Go to the source code of this file.

Functions

bool describe_compound_attribute (MObject &node)
 Extracts the children of this attribute from the MObject. More...
 
void describe_maya_attribute (MObject &node, const string &attribute_name)
 Writes some warning output about the indicated Maya attribute. More...
 
bool get_angle_attribute (MObject &node, const string &attribute_name, double &value)
 Extracts the named angle in degrees from the MObject. More...
 
bool get_bool_attribute (MObject &node, const string &attribute_name, bool &value)
 Extracts the named boolean attribute from the MObject. More...
 
bool get_enum_attribute (MObject &node, const string &attribute_name, string &value)
 Extracts the enum attribute from the MObject as a string value. More...
 
bool get_mat4d_attribute (MObject &node, const string &attribute_name, LMatrix4d &value)
 Extracts the named 4x4 matrix from the MObject. More...
 
bool get_maya_plug (MObject &node, const string &attribute_name, MPlug &plug)
 Gets the named MPlug associated, if any. More...
 
bool get_string_attribute (MObject &node, const string &attribute_name, string &value)
 Extracts the named string attribute from the MObject. More...
 
void get_tag_attribute_names (MObject &node, pvector< string > &tag_names)
 artists should be able to set arbitrary tags. More...
 
bool get_vec2_attribute (MObject &node, const string &attribute_name, LVecBase2 &value)
 Extracts the named two-component vector from the MObject. More...
 
bool get_vec2d_attribute (MObject &node, const string &attribute_name, LVecBase2d &value)
 Extracts the named two-component vector from the MObject. More...
 
bool get_vec3_attribute (MObject &node, const string &attribute_name, LVecBase3 &value)
 Extracts the named three-component vector from the MObject. More...
 
bool get_vec3d_attribute (MObject &node, const string &attribute_name, LVecBase3d &value)
 Extracts the named three-component vector from the MObject. More...
 
bool has_attribute (MObject &node, const string &attribute_name)
 Returns true if the node has the indicated attribute, false otherwise. More...
 
bool is_connected (MObject &node, const string &attribute_name)
 Returns true if the named connection exists on the node and is connected to anything, false otherwise. More...
 
void list_maya_attributes (MObject &node)
 Writes some info output showing all the attributes on the given dependency node. More...
 
bool remove_attribute (MObject &node, const string &attribute_name)
 Removes the named attribute from the indicated Maya node. More...
 
bool set_string_attribute (MObject &node, const string &attribute_name, const string &value)
 Sets the named string attribute on the MObject. More...
 
string string_mfndata_type (MFnData::Type type)
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2000-02-16

Definition in file maya_funcs.cxx.

Function Documentation

◆ describe_compound_attribute()

bool describe_compound_attribute ( MObject &  node)

Extracts the children of this attribute from the MObject.

test for now

Definition at line 513 of file maya_funcs.cxx.

◆ describe_maya_attribute()

void describe_maya_attribute ( MObject &  node,
const string &  attribute_name 
)

Writes some warning output about the indicated Maya attribute.

Definition at line 565 of file maya_funcs.cxx.

◆ get_angle_attribute()

bool get_angle_attribute ( MObject &  node,
const string &  attribute_name,
double &  value 
)

Extracts the named angle in degrees from the MObject.

Definition at line 179 of file maya_funcs.cxx.

◆ get_bool_attribute()

bool get_bool_attribute ( MObject &  node,
const string &  attribute_name,
bool &  value 
)

Extracts the named boolean attribute from the MObject.

Definition at line 157 of file maya_funcs.cxx.

References has_attribute().

◆ get_enum_attribute()

bool get_enum_attribute ( MObject &  node,
const string &  attribute_name,
string &  value 
)

Extracts the enum attribute from the MObject as a string value.

Definition at line 398 of file maya_funcs.cxx.

References get_maya_plug().

◆ get_mat4d_attribute()

bool get_mat4d_attribute ( MObject &  node,
const string &  attribute_name,
LMatrix4d &  value 
)

Extracts the named 4x4 matrix from the MObject.

Definition at line 337 of file maya_funcs.cxx.

◆ get_maya_plug()

bool get_maya_plug ( MObject &  node,
const string &  attribute_name,
MPlug &  plug 
)

Gets the named MPlug associated, if any.

Definition at line 41 of file maya_funcs.cxx.

Referenced by get_enum_attribute(), and is_connected().

◆ get_string_attribute()

bool get_string_attribute ( MObject &  node,
const string &  attribute_name,
string &  value 
)

Extracts the named string attribute from the MObject.

Definition at line 440 of file maya_funcs.cxx.

◆ get_tag_attribute_names()

void get_tag_attribute_names ( MObject &  node,
pvector< string > &  tag_names 
)

artists should be able to set arbitrary tags.

Query all the attributes on this object and return the lists of attribute names that has "tag" prefix

Definition at line 367 of file maya_funcs.cxx.

◆ get_vec2_attribute()

bool get_vec2_attribute ( MObject &  node,
const string &  attribute_name,
LVecBase2 &  value 
)

Extracts the named two-component vector from the MObject.

Definition at line 197 of file maya_funcs.cxx.

◆ get_vec2d_attribute()

bool get_vec2d_attribute ( MObject &  node,
const string &  attribute_name,
LVecBase2d &  value 
)

Extracts the named two-component vector from the MObject.

Definition at line 267 of file maya_funcs.cxx.

◆ get_vec3_attribute()

bool get_vec3_attribute ( MObject &  node,
const string &  attribute_name,
LVecBase3 &  value 
)

Extracts the named three-component vector from the MObject.

Definition at line 232 of file maya_funcs.cxx.

◆ get_vec3d_attribute()

bool get_vec3d_attribute ( MObject &  node,
const string &  attribute_name,
LVecBase3d &  value 
)

Extracts the named three-component vector from the MObject.

Definition at line 302 of file maya_funcs.cxx.

◆ has_attribute()

bool has_attribute ( MObject &  node,
const string &  attribute_name 
)

Returns true if the node has the indicated attribute, false otherwise.

Definition at line 85 of file maya_funcs.cxx.

Referenced by get_bool_attribute().

◆ is_connected()

bool is_connected ( MObject &  node,
const string &  attribute_name 
)

Returns true if the named connection exists on the node and is connected to anything, false otherwise.

Definition at line 72 of file maya_funcs.cxx.

References get_maya_plug().

◆ list_maya_attributes()

void list_maya_attributes ( MObject &  node)

Writes some info output showing all the attributes on the given dependency node.

Primarily useful during development, to figure out where the heck Maya hides some of the connected properties.

Definition at line 664 of file maya_funcs.cxx.

◆ remove_attribute()

bool remove_attribute ( MObject &  node,
const string &  attribute_name 
)

Removes the named attribute from the indicated Maya node.

Returns true if successful, false otherwise.

Definition at line 107 of file maya_funcs.cxx.

◆ set_string_attribute()

bool set_string_attribute ( MObject &  node,
const string &  attribute_name,
const string &  value 
)

Sets the named string attribute on the MObject.

Definition at line 469 of file maya_funcs.cxx.

Referenced by MayaShaderColorDef::reset_maya_texture().