THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/01/2012 at 08:54, xxxxxxxx wrote:
I can get the layer info
but cannot access the individual elements as per the SDK
Return type:
dict{solo: bool, view: bool, render: bool, manager: bool, locked: bool, generators: bool, expressions: bool, animation: bool, color: Vector}
I get an error - dict object has no attribute 'color' ?
help appreciated
import c4d
from c4d import gui
def main() :
doc = c4d.documents.GetActiveDocument()
root = doc.GetLayerObjectRoot()#Gets the layer manager
LayersList = root.GetChildren()
for layers in LayersList:
print layers.GetName()
if layers.GetBit(c4d.BIT_ACTIVE) :
print"Selected Layer: ", layers.GetName()
print"Selected Layer Settings: ", layers.GetLayerData(doc)
print"Selected Layer Colour: ", layers.GetLayerData(doc).color #this line doesnt work
if __name__=='__main__':
main()