Gh_Component.Exposure is a read-only property. This means that you can only override it, but cannot assign a value to it.
To override it, just add a def that looks like this to the class:
@property #not required but looks good
def get_Exposure(self): #override Exposure property
return Grasshopper.Kernel.GH_Exposure.primary
The error you see is because Python would allow you to override the ‘Exposure’ name also by using the property() function: http://www.ironpython.info/index.php?title=Overridable_Properties
For more info, see some IronPython books:
I can highly recommend the second.
To simplify, just always override properties in the way shown above and it will all work well.
Thanks,
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com