Skip navigation
Currently Being Moderated

Reflecting arts using SDK API is different from applying Transform Effects

Aug 3, 2012 5:05 AM

Hi,

 

I have a requirement of reflecting art(s) in the same manner as reflect-x in Effect->Distort and Transform->Transform. So far I have managed to reflect the art(s) using action manager.

The difference between both the methods is that in the former method there is a single resultant art object, whereas, in the latter method two art objects are created.

 

How can I use action manager or any similar method to get the result same as that in applying reflect-x from Effect menu?

 

Looking forward to your suggestion.

 

Thanks

D.A

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 6:46 AM   in reply to DeepAlone

    If you just want to reflect art,do it with the AITransformArtSuite. Reflect is simple operation that can be easily expressed as a matrix. the TransformArt suite lets you apply a matrix to artwork. So build yourself a reflection matrix, then apply it. No need for the action manager!

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 8, 2012 1:45 PM   in reply to DeepAlone

    Oh, well that should still be easy. Just copy the art (AIArtSuite::DuplicateArt()) and then use the AITransformSuite on it to reflect it. If you want to combine them, it depends on the art type. You can group any two things together, so that's one option. Or if its a path, you can create a compound path and combine them that way. Is the source art always going to be a path? Or can it be any kind of artwork?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2012 7:45 AM   in reply to DeepAlone

    Ah, so what you're really looking for is the ability to apply a Live Effect to art? That is something I can help you with, though I'll have to brush up on my effect application code. I posted the code for a plugin that lets you debug a variety of things in Illustrator, one of which is the ability to see the name & parameters of a live effect. I can do that for you in the short term but you might consider grabbing that, since it might useful in the future

     

    Here are the dictionary entries for a reflection (with parameters you can probably guess):

     

    Effect name: "Adobe Transform"

     

    + transformPatterns [ "Boolean" ] = false

    + rotate_Degrees [ "Real" ] = 0

    + scaleH_Percent [ "Real" ] = 100

    + pinPoint [ "Integer" ] = 4

    + randomize [ "Boolean" ] = false

    + rotate_Radians [ "Real" ] = 0

    + scaleV_Factor [ "Real" ] = 1

    + reflectY [ "Boolean" ] = true

    + scaleLines [ "Boolean" ] = true

    + scaleV_Percent [ "Real" ] = 100

    + moveH_Pts [ "Real" ] = 0

    + scaleH_Factor [ "Real" ] = 1

    + numCopies [ "Integer" ] = 2

    + moveV_Pts [ "Real" ] = -110

    + reflectX [ "Boolean" ] = false

    + transformObjects [ "Boolean" ] = true

     

    You can read up on how to use this information to apply it without PlayAction here: http://forums.adobe.com/thread/925871?tstart=0

     

    P.S. Telling it to do two copies seems to make the original art stay visible. If you do one copy, the original is there, it just not rendered (you can still click on where it would be and get its selection box).

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points