Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

py_material.C File Reference

#include "py_commands.h"
#include "CmdMaterial.h"
#include "utilities.h"
#include "MaterialList.h"
#include "CommandQueue.h"
#include "VMDApp.h"
#include <stdlib.h>
#include <ctype.h>

Go to the source code of this file.

Functions

PyObject * py_listall (PyObject *self, PyObject *args)
PyObject * py_settings (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_set_default (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_add (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_matdelete (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_rename (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * py_change (PyObject *self, PyObject *args, PyObject *kwargs)
PyObject * initmaterial (void)

Variables

const char listall_doc []
const char settings_doc []
const char default_doc []
const char add_doc []
const char del_doc []
const char rename_doc []
const char change_doc []
PyMethodDef methods []
const char material_moddoc []


Function Documentation

PyObject* initmaterial void   
 

Definition at line 366 of file py_material.C.

References material_moddoc, and methods.

PyObject* py_add PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 167 of file py_material.C.

References as_pystring, get_vmdapp, VMDApp::material_add, MaterialList::material_index, VMDApp::materialList, NULL, and result.

PyObject* py_change PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 287 of file py_material.C.

References get_vmdapp, MAT_AMBIENT, MAT_DIFFUSE, MAT_MIRROR, MAT_OPACITY, MAT_OUTLINE, MAT_OUTLINEWIDTH, MAT_SHININESS, MAT_SPECULAR, MAT_TRANSMODE, VMDApp::material_change, MaterialList::material_index, VMDApp::materialList, and NULL.

PyObject* py_listall PyObject *    self,
PyObject *    args
[static]
 

Definition at line 34 of file py_material.C.

References as_pystring, get_vmdapp, MaterialList::material_name, VMDApp::materialList, NULL, and MaterialList::num.

PyObject* py_matdelete PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 207 of file py_material.C.

References get_vmdapp, VMDApp::material_delete, and NULL.

PyObject* py_rename PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 234 of file py_material.C.

References get_vmdapp, MaterialList::material_index, VMDApp::material_rename, VMDApp::materialList, and NULL.

PyObject* py_set_default PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 128 of file py_material.C.

References get_vmdapp, MaterialList::material_index, VMDApp::material_restore_default, VMDApp::materialList, and NULL.

PyObject* py_settings PyObject *    self,
PyObject *    args,
PyObject *    kwargs
[static]
 

Definition at line 71 of file py_material.C.

References MaterialList::get_ambient, MaterialList::get_diffuse, MaterialList::get_mirror, MaterialList::get_opacity, MaterialList::get_outline, MaterialList::get_outlinewidth, MaterialList::get_shininess, MaterialList::get_specular, MaterialList::get_transmode, get_vmdapp, MaterialList::material_index, VMDApp::materialList, and NULL.


Variable Documentation

const char add_doc[] [static]
 

Initial value:

"Create a new material with the given name. Optionally, copy material settings\n"
"from an existing material. If no name is given, make up a new name\n\n"
"Args:\n"
"    name (str): Name of new material. If None, will be made up if copy is None\n"
"    copy (str): Name of material to copy settings from. If None,\n"
"        material settings will be initialized to Opaque material"

Definition at line 160 of file py_material.C.

const char change_doc[] [static]
 

Initial value:

"Change properties of a material. All property arguments are optional and are\n"
"used to set the new value of each property.\n\n"
"Args:\n"
"    name (str): Material name to change\n"
"    ambient (float): Ambient light of material\n"
"    diffuse (float): Diffuse light scattering of material\n"
"    specular (float): Amount of specular highlights from material\n"
"    shininess (float): Shininess of material\n"
"    mirror (float): Reflectivity of material\n"
"    opacity (float): Opacity of material\n"
"    outline (float): Amount of outline on material\n"
"    outline_width (float): Width of outline on material\n"
"    transmode (bool): If angle-modulated transparency should be used\n"

Definition at line 273 of file py_material.C.

const char default_doc[] [static]
 

Initial value:

"Restore the default settings of a material\n\n"
"Args:\n"
"    name (str): Material name to restore"

Definition at line 124 of file py_material.C.

const char del_doc[] [static]
 

Initial value:

"Deletes a material with given name\n\n"
"Args:\n"
"    name (str): Material to delete"

Definition at line 203 of file py_material.C.

const char listall_doc[] [static]
 

Initial value:

"Lists all currently defined materials\n\n"
"Returns:\n"
"    (list of str): Available material names"

Definition at line 30 of file py_material.C.

const char material_moddoc[] [static]
 

Initial value:

"Methods to control the materials used to render molecules or graphics objects"

Definition at line 351 of file py_material.C.

Referenced by initmaterial.

PyMethodDef methods[] [static]
 

Initial value:

 {
  {"listall", (PyCFunction)py_listall, METH_NOARGS, listall_doc},
  {"settings", (PyCFunction)py_settings, METH_VARARGS | METH_KEYWORDS, settings_doc},
  {"add", (PyCFunction)py_add, METH_VARARGS | METH_KEYWORDS, add_doc},
  {"delete", (PyCFunction)py_matdelete, METH_VARARGS | METH_KEYWORDS, del_doc},
  {"rename", (PyCFunction)py_rename, METH_VARARGS | METH_KEYWORDS, rename_doc},
  {"change", (PyCFunction)py_change, METH_VARARGS | METH_KEYWORDS, change_doc },
  {"default", (PyCFunction)py_set_default, METH_VARARGS | METH_KEYWORDS, default_doc },
  {NULL, NULL}
}

Definition at line 339 of file py_material.C.

Referenced by initmaterial.

const char rename_doc[] [static]
 

Initial value:

"Change the name of an existing material\n\n"
"Args:\n"
"    name (str): Name of material to change\n"
"    newname (str): New name for material"

Definition at line 229 of file py_material.C.

const char settings_doc[] [static]
 

Initial value:

"Get settings that comprise the definition of a given material\n\n"
"Args:\n"
"    name (str): Material name to query\n"
"Returns:\n"
"    (dict str->str): Material properties and values"

Definition at line 65 of file py_material.C.


Generated on Fri Mar 29 02:46:49 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002