[Bf-python] Python API feature request

Campbell Barton cbarton at metavr.com
Thu Apr 5 18:13:52 CEST 2007


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
> 


-- 
See MetaVR Visuals Used at the Combat Studies Institute
http://www.metavr.com/casestudies/baghdadviews.html

Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list