Blender Git Loki

Git Commits -> Revision 5c94896

Revision 5c94896 by Matt Ebb (master)
April 22, 2010, 01:55 (GMT)
Fix [#22078] Cannot apply modifier in python (context error)

Previously all modifier operators relied on the buttons layout data context pointer to
decide which modifier to work on. This meant that these operators would only work
from from the properties panel, and not from scripting/macros or for operator redo.

This commit makes all modifier operators take the modifier name as an operator
property, so the operators can be re-done or executed outside of the modifier panel.
When invoking the operators from the modifier panel, they automatically fill in the
operator property from context.

This isn't a perfect API design, but it does bring these operators in line with the design
of being able to access all UI functionality via other means like scripts.

Commit Details:

Full Hash: 5c948964901435ee22596dc6180284605ab3b52d
SVN Revision: 28338
Parent Commit: 27fa482
Lines Changed: +255, -69

4 Modified Paths:

/source/blender/blenkernel/BKE_modifier.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/modifier.c (+11, -0) (Diff)
/source/blender/editors/interface/interface_templates.c (+1, -0) (Diff)
/source/blender/editors/object/object_modifier.c (+242, -69) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021