[Bf-python] Python API feature request

Claudio "malefico" Andaur malefico at manosdigitales.com
Thu Apr 5 18:12:47 CEST 2007


Holly molly ! thanks Cambo !

malefico

Campbell Barton wrote:
> Just added .reset() to blender-cvs,
>
> heres the script
>
> #!BPY
>
> """
> Name: 'Reset All Hooks'
> Blender: 242
> Group: 'Object'
> Tooltip: 'resets hooks of all modifiers this object uses'
> """
> import bpy
> scn = bpy.scenes.active
> ob = scn.objects.active
>
> for m in ob.modifiers:
>     try:        m.reset()
>     except:        pass
>
> ob.makeDisplayList()
>
>
>
> Claudio "malefico" Andaur wrote:
>> Hey python gurus !
>>
>> I would like to explain a little problem I have.
>>
>> When using hooks extensively, let's say I have a character with 60-70 
>> hooks in different objects, and you need to make a little tweak on 
>> the character, it is often needed to "reset" every hook modifier 
>> which is a big big BIG pain in the ass.
>>
>> Now, we thought it would be better if we could script this resetting 
>> and apply script for the currently selected object, or groups of 
>> objects. Nice idea.
>>
>> The thing is, I've been told by python gurus here at the studio that 
>> API doesn't currently let us access to the "reset" function in Hook 
>> modifier.
>>
>> I would really appreciate if this could be added, to light up my work 
>> a little.
>>
>> Thanks in advance !
>>
>>
>> malefico.
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-python
>>
>
>




More information about the Bf-python mailing list