Made it possible to copy modifiers from the python API

ob1.modifiers = ob2.modifiers
This commit is contained in:
2006-12-28 06:47:56 +00:00
parent ab06e52343
commit 8ea2b66810
6 changed files with 141 additions and 101 deletions

View File

@@ -459,8 +459,17 @@ class Object:
@ivar drawSize: The size to display the Empty.
Value clamped to [0.01,10.0].
@type drawSize: float
@ivar modifiers: The modifiers associated with the object. Read-only.
@type modifiers: L{Modifier Sequence<Modifier.Modifiers>}
@ivar modifiers: The modifiers associated with the object.
Example::
# copy the active objects modifiers to all other visible selected objects
from Blender import *
scn = Scene.GetCurrent()
ob_act = scn.objects.active
for ob in scn.objects.context:
# Cannot copy modifiers to an object of a different type
if ob.type == ob_act.type:
ob.modifiers = ob_act.modifiers
@type modifiers: L{Modifier Sequence<Modifier.ModSeq>}
@ivar constraints: a L{sequence<Constraint.Constraints>} of
L{constraints<Constraint.Constraint>} for the object. Read-only.
@type constraints: Constraint Sequence