3 Replies Latest reply: Sep 3, 2010 7:50 AM by deerowbear RSS

    groups paths

    deerowbear Community Member

      I am currently building a plugin and trying to group three AIArtHandle objects. These items are listed below.

       

      Could anyone direct me to the correct syntax for creating a group?

       

      error = sAIArt->NewArt( kPathArt, kPlaceAboveAll, art_group, &shaft_shadow_path );

      error = sAIArt->NewArt( kPathArt, kPlaceAboveAll, art_group, &arrow_shadow_path );

      error = sAIArt->NewArt( kPathArt, kPlaceAboveAll, art_group, &shaft_path );

       

      Thanks Daniel

        • 1. Re: groups paths
          JLGPanda Community Member

          Hi,

           

          First, I create a group with

          error=sAIArt->NewArt(kGroupArt, kPlaceAboveAll, NULL, &AHGroup);

           

          then, I create my paths with

           

          error = sAIArt->NewArt( kPathArt, kPlaceInsideOnTop, AHGroup, &MyPath1);

          error = sAIArt->NewArt( kPathArt, kPlaceInsideOnTop, AHGroup, &MyPath2);

          error = sAIArt->NewArt( kPathArt, kPlaceInsideOnTop, AHGroup, &MyPath3);

           

          I hope this will be useful,

           

          JLG.

          • 2. Re: groups paths
            A. Patterson Community Member

            kPlaceAboveAll ignores the prepositional object (in this case, the group). Ditto for kPlaceBelowAll. If you want to use the prepositional object, you need to use kPlaceAbove, kPlaceBelow (which put the art to one side or the other of the prepositional object) or kPlaceInsideOnTop or kPlaceInsideOnBottom (which obviously works on things like groups).

             

            So the code JLGPanda posted would work just fine for you, but mainly you just need to use kPlaceInsideOnTop instead of kPlaceAboveAll.

            • 3. Re: groups paths
              deerowbear Community Member

              Thanks for the help that worked great.