[Bf-python] Modifiers syntax

Ken Hughes khughes at pacific.edu
Sun Apr 23 16:15:50 CEST 2006


Campbell Barton wrote:
> Since were using getitem/setitem anyhow.
> 
> mod[mod.keys().LEVELS] = 3     # set subsurf subdivision levels to 3
>   ...couldent we just use
> mod["LEVELS"] = 3     # set subsurf subdivision levels to 3
>   ...and return a key error if the attribute dosent exist exist for that 
> modifier?
> 
> Also, Id also prefer strings for append.
> ob.modifiers.append("SUBSURF")

I thought the goal for the API was to get rid of string in favor of 
constants (otherwise I would have left the Ipo stuff as it was).

Ken



More information about the Bf-python mailing list