Copy link to clipboard
Copied
Dear Friends,
Is it possible to Make Live Paint(Object>Live Paint>Make ) by code.
I select a compound path,and try the following code to make Live Paint.
AIActionParamValueRef paramValueRef = NULL;
sAIActionManager->AINewActionParamValue(¶mValueRef);
error=sAIActionManager->PlayActionEvent("Make Planet X",kDialogOff, paramValueRef);
The PlayActionEvent Method returns error=1346458189.
I don't Know is it correct method to Make Live paint.
Please give your suggesstions to Make Live paint.
Regards
Nathan.
Copy link to clipboard
Copied
Is "Make Planet X" the actual name of an action? Did you load up your AIActionParamValueRef with any settings?
Copy link to clipboard
Copied
Dear Friend,
Thank you For Immediate reply,
I found "Make Planet X"(For Live Paint Make) in Illustrator SDK.
So I tried it as the name of the action.I did not Know is it Correct or Not.
I did not load Settings for AIActionParamValueRef.
I just tried the following code,
AIActionParamValueRef paramValueRef = NULL;
sAIActionManager->AINewActionParamValue(¶mValueRef);
error=sAIActionManager->PlayActionEvent("Make Planet X",kDialogOff, paramValueRef);
The PlayActionEvent Method returns error=1346458189.
Please give your suggestion to Make Live Paint Groups by Code.
Thank you Friend,
Nathan
Copy link to clipboard
Copied
Can't you just use the AILiveEffect suite directly?
Copy link to clipboard
Copied
Dear Friend,
Thank you For Your Suggestion.
I have tried sAILiveEffect->AddLiveEffect but there is no change in My Current document PathArt and CompoundPath Art.
See the Code Below I have tried,
AILiveEffectData effectData;
AIMenuItemHandle menuHandle = nil;
char categoryStr[] = " SDK";
char nameStr[] = " Twirl...";
effectData.self = message->d.self;
effectData.name = nameStr; // Localized name of the effect
effectData.title = nameStr;
effectData.majorVersion = 1;
effectData.minorVersion = 0;
effectData.prefersAsInput = (kGroupInputArt | kPathInputArt | kCompoundPathInputArt);//kAnyInputArt; // AIStyleFilterPreferedInputArtType
effectData.styleFilterFlags = kPostEffectFilter; // AIStyleFilterFlags
AILiveEffectHandle handle;
error = sAILiveEffect->AddLiveEffect(&effectData, &handle);
Please note that error=0;
Is Any Methods in AILiveEffectSuite Perform equivalent action to Object>Live Paint>Make.
I want to make closed paths from the Path Arts and Compound Path Arts in my Current document.So I get the Closed Path By Using The Following Steps
1)Initially i am having 4 connected Lines.But not Closed
2)Then I Make Live Paint Groups by using Object>Live Paint>Make.
3)Apply Fill For the Art and Expand the Live Paint by Object>Live Paint>Expand.
Finally I got Closed path as my Expectation.
Is Any Illustrator SDK Methods Available to Perform the Above Operation.
Please note that My document may have large number of PathArts and Compound Path Arts.My Expectation is to Make Closed Path.
Please give your Suggestion.
please note that I have perform Object>Live Paint>Expand. by using the following Method.
sAIExpand->Expand(artHandle, kExpandPluginArt, 0);
Thankyou Friend,
Nathan.