get the last object in a List
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/10/2012 at 07:46, xxxxxxxx wrote:
I am trying the get the last object in a list (array)
laysmallstuff = False # just for the forum .... if not laysmallstuff: c4d.CallCommand(100004738) # create a new layer which apears at the end myLayersList = root.GetChildren() # get the new list newlayer = myLayersList(-1) # i read this in a python tutorial dont know if this -1 works in cinema
The console says:
TypeError: 'list' object is not callableany ideas ?
kind regards -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/10/2012 at 09:09, xxxxxxxx wrote:
To get the items in a Python list we use brackets: [-1].