Changes between Version 12 and Version 13 of ChimeraAnimationTasks


Ignore:
Timestamp:
Dec 10, 2010, 12:45:21 PM (15 years ago)
Author:
Darren Weber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChimeraAnimationTasks

    v12 v13  
    8383
    8484
    85 ==== Color Attributes ====
     85==== Color and Material Attributes ====
    8686
    8787See http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_ColorWellUI.html
    8888
    8989Also need a function for color interpolations (linear may suffice).  This may be a simple function to interpolate each component of the RGBA tuple from stateA to stateB over N frames (the range of values is between 0-1, so it's a floating point interpolation).
     90
     91Get a PDB molecule to play with:
     92{{{
     93chimera.runCommand('open 2por')
     94om = chimera.openModels.list(all=True)
     95por2 = om[1]
     96}}}
     97
     98Exploring color properties:
     99{{{
     100>>> por2.color
     101<_chimera.MaterialColor object at 0x3d50dc8>
     102>>> por2.color.name()
     103u'_openColor00'
     104>>> por2.color.rgba()
     105(1.0, 1.0, 1.0, 1.0)
     106>>> por2.color.ambientDiffuse
     107(1.0, 1.0, 1.0)
     108>>> por2.color.isTranslucent()
     109False
     110>>> por2.color.opacity
     1111.0
     112}}}
     113
     114Chimera material attributes are collected with color attributes.
     115{{{
     116# chimera.Material object
     117>>> por2.color.material
     118<_chimera.Material object at 0x2fd7c60>
     119>>> por2.color.material.name()  # material name (unicode str)
     120u'default'
     121>>> por2.color.material.shininess
     12230.0
     123>>> por2.color.material.specular
     124(0.85, 0.85, 0.85)
     125>>> por2.color.material.opacity
     1261.0
     127>>> por2.color.material.ambientDiffuse
     128(1.0, 1.0, 1.0)
     129>>> por2.color.material.isTexture()
     130False
     131>>> por2.color.material.isTranslucent()
     132False
     133}}}
    90134
    91135