Hi Ralph,
By design, LPEs do not know about SVG objects and all that. An LPE just receives a path (the actual path data only) and should output a path. However, a trick was implemented to allow for some special LPEs that need a bit more information. Have a look at Effect::doBeforeEffect, which is called before doEffect and receives the item on which the LPE is applied (LPEBendPath uses it for example). Careful though: test whether your stuff works when the LPE is applied on a group!
Ciao, Johan
On 2-6-2011 15:47, Skinner, Ralph wrote:
Hi,
I'm writing a Live Path Effect, and I'm trying to get the label and/or id of the path to which the effect is being applied. I tried this in the ‘doEffect’ method:
Effect::doEffect_pwd2 (Geom::Piecewise<Geom::D2Geom::SBasis > const & pwd2_in) { LivePathEffectObject *myLPE = (LivePathEffectObject*)this->getLPEObj(); myLPE->defaultLabel(); …
...but of course this returns the label of the path effect, not the path itself.
Any suggestions?
Thanks!