[Bf-python] udpdate enum
Campbell Barton
ideasman42 at gmail.com
Thu May 26 20:15:52 CEST 2011
dynamic enums committed r36928.
See: http://www.pasteall.org/21942/python
So items can be assigned a function that returns a list (rather then a list).
On Thu, May 26, 2011 at 8:17 AM, Campbell Barton <ideasman42 at gmail.com> wrote:
> This seems similar to your previous question,
> it sounds like you want a dynamic enum still, and from my previous
> mail, we don't support them yet from python.
>
> 2011/5/26 Yuniel Castro González <ycastrog at estudiantes.uci.cu>:
>> Hi for all.
>> I have an operator that shows an enum(combobox) with default element ('a' in this case), but I need change this value when I execute the operator (change 'a' by 'b' in this case). This is the idea but this operator doesn't satisfy me.
>> How can I do????
>> Thanks in advance.
>>
>> *******************************************
>>
>> class OBJECT_OT_view_lists(bpy.types.Operator):
>> bl_idname......
>>
>> subdivide = [('a','a','a')]
>> subdivides = EnumProperty(name="Groups", description="Generated groups", items=subdivide)
>>
>> def draw(self, context):
>> layout = self.layout
>> row = layout.row()
>> row.prop(self, 'subdivides')
>>
>> def execute(self, context):
>> subdivide = [('b','b','b')]
>> return {'FINISHED'}
>>
>> --
>>
>>
>>
>>
>>
>>
>>
>>
>> Yuniel
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-python
>>
>
>
>
> --
> - Campbell
>
--
- Campbell
More information about the Bf-python
mailing list