Programmatic access to shapes

Hi folks,
I'm wondering if there's a way to create/manipulate the contents of shape layers through either the javascript scripting api or the sdk.
I can't find any information about this in each respective documentation.
The underlying problem I have is to import custom vector graphics programmatically (they come as neither ai or svg), but do consist of bezier primitives.
Thank you in advance, Jens

Hi Jens,
if you can't use the importer, you can still do something if you know the curves data.
I can't tell you how it would work in the sdk.
In AE ExtendScript framework shapes are instances of Shape(), which are objects with 4 properties (for version < CS6) and slightly more since CS6 (for the feather, but for your purpose you can ignore those properties and leave them undefined):
var shape = new Shape();
shape.vertices = myVerticesData;
shape.inTangents = myInTangentsData;
shape.outTangents = myOutTangentsData;
shape.closed = true/false;
where myVerticesData, myInTangentsData, myOutTangentsData are to be defined by you from your shape data.
You might need to do some sort of conversion if your data don't come out in the same form as AE uses.
They should be arrays of 2D points/vectors ( [[x0,y0], [x1,y1], [x2,y2] ...]) of the same length.
myVerticesData[k] is the kth vertex of the shape (a point), myInTangentsData[k] and myOutTangentsData[k] the incoming and outcoming tangents at that vertex (vectors).
Apparently shape objects are being watched so you can't modify shape vertices individually like this: shape.vertices[k] = [x, y]; It won't work (ignored).
You must set the shape array attributes in one shot as above.
If the inTangents or outTangents arrays are not specified they will default to arrays of [0,0].
Once you have transcripted your shape data into a AE Shape() object, you can use it to set the value of a shape layer path or a mask path.
- For a shape layer it would be like this:
var comp = [the comp you want to work with];
var layer = comp.layers.addShape();
var group = layer.content.addProperty("ADBE Vector Group");                              // adds a Group (Empty) to the shape content
var shapeGroup = group.content.addProperty("ADBE Vector Shape - Group");       // adds a (custom) Path to that group
shapeGroup.name = "Imported Shape";
shapeGroup.path.setValue(shape);
If you don't want a group, omit that line and do directly var shapeGroup = layer.content.addProperty("ADBE Vector Shape - Group");
Note: for shape layers you'll probably have to work out the fact that they don't have exactly the same behaviour as bounded layers with respect to coordinates,
so you'll have to translate all vertices.
- For a mask:
var comp = [the comp you want to work with];
var layer = comp.layers.addSolid([1,0,0], "Imported Shape", comp.width, comp.height, comp.pixelAspect, comp.duration);
var group = layer.property("ADBE Mask Parade"); // equivalently: var group = layer.mask;
var shapeGroup = group.addProperty("ADBE Mask Atom");
shapeGroup.name = "Imported Shape";
shapeGroup.maskPath.setValue(shape);
Xavier.

Similar Messages

  • 11g How to programmatically access Calendar Rules

    Hi guys,
    I use BPM 11g and I'm trying to programmatically access calendar rules configuration for the organization in order to display labor dates in ADF task flow using Simple Expression like: now + 2 business days.
    Has anyone done this on 11g?
    Thanks in advance!

    Hi,
    Do NOT use ExternalContext.getRequest(), but ExternalContext.getRequestMap().put() in the backing bean. As for the programmatic access, as mentionned it might be a scope issue. When is your managed bean code executed exactly?
    ~ Simon

  • How to programmatically access requestScope objects

    Hi all,
    in the backing bean of a page I set some request attributes using the following code:
    FacesContext context = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
    request.setAttribute(<key string>,<MyCustomObject>);
    and then I navigate to another page. In this page I fill in some input text fields using EL expressions, like #{requestScope.<key string>.<property from MyCustomObject>}.
    However when inside the backing bean of this page, i try to programmatically access the requestScope using:
    FacesContext context = FacesContext.getCurrentInstance();
    <MyCustomObjectClass> var = <MyCustomObjectClass>context.getExternalContext().getRequestMap().get(<key string>);
    I get the code return null.
    What can I have done wrong that my code does not return the objects I pass through the requestScope while the EL expressions work?

    Hi,
    Do NOT use ExternalContext.getRequest(), but ExternalContext.getRequestMap().put() in the backing bean. As for the programmatic access, as mentionned it might be a scope issue. When is your managed bean code executed exactly?
    ~ Simon

  • Programmatic Access Not Working

    I'm having a problem with Outlook 2013 and programmatic access. A user is using a piece of software (called Exchequer - not important really but I list it for thoroughness). The software sends emails through Outlook. This has worked fine in the past but
    has suddenly stopped working.
    I have checked the user's Outlook settings for programmatic access (File - Options - Trust Center - Trust Center Settings - Programmatic Access) and it is currently set to "Warn me about suspicious activity when my anti-virus is inactive or out-of-date
    (recommended)". The anti-virus status is currently listed as "Valid". The anti-virus being used is Trend Micro Titanium 2013.
    According to the settings, Outlook should not warn or ask for access when Exchequer tries to send emails through Outlook. However, it does. Every time the user uses Exchequer to send an email, Outlook pops up a little box asking to permit access for a number
    of minutes.
    As far as I understand this, it should not be occurring. Am I in error in my belief, or is there something wrong here?

    Hi,
    Is there any attachment include the email? And check to see whether the attachment cay caused the issue.
    And is this issue occurs to all users and all emails?
    Also, start Windows in clean boot to check whether the issue is caused by some third party services.
    Jaynet Zhang
    TechNet Community Support

  • Programmatically Accessing Self Sign in Plug in for Digital Signature

    Hello There,
    We are looking forward to use “Adode Acrobat 9 Pro – Self Sign in Plug in” for one of the application to digitally sign PDF document i.e. appending signature to existing PDF document. We have gone through Adobe site (http://learn.adobe.com/wiki/download/attachments/52658564/samplesignatures.pdf?version=1 ; http://www.adobe.com/ap/epaper/tips/acrsignatures/ ) and explored “Tips and Techniques” along with screenshots.
    We would like your help on following queries:
    ·         Can we programmatically from C#.NET access Adobe Object and create certificate for digital signature? If Yes, can you please provide pointers, references and sample code snippets? [We understand that we do not need to purchase SDK as Professional would be sufficient for digital PDF signature]
    ·         Does Adobe Pro installer provide DLL which can be leveraged in Code base i.e. C#.NET?
    ·         How does certificate management work for digital signing? Can third party like verisign, local computer / certificate from organization server work for digital PDF signature?
    ·         Please provide Technical Reference manual to use Adobe from C#.NET
    ·         Can you please throw some light and pointers on Licensing and Cost?
    We are running on a deadline hence your quick help and response will be highly appreciated.
    Thanks & Regards

    best check on the sdk forum:
    http://forums.adobe.com/community/acrobat/acrobat_sdk
    sdk docs can be found here:
    http://www.adobe.com/devnet/acrobat/?view=documentation

  • Programmatically access to webBean structure

    Hi,
    is it possible to programmatically retrieve all the children of a webBean?
    If I have a webBean, I can do:
    OAWebBean owb = webBean.findChildRecursive("ChildName");
    But, how can obtain all the children without to know the "ChildName"?
    I have tried with:
    Enumeration enum = webBean.getChildNames();
    But, after doing that, if I have:
    String child = (String)enum.next();
    OAWebBean owb = webBean.findChildRecursive(child);
    owb is always null, because the enumeration doesn't contain the children "ID" of webBean, but something like "corporanteBranding", "pageButtons", "message".
    Nothing else.
    Is there a method to access to the children ids starting from a webbean?
    Thanks a lot.
    Bye
    Raffy

    Hi,
    I am trying to get control on flexfield segments and i think i should be using
    getIndexedChild(RenderingContext, int)" ....
    Can you pls tell me how do i get the renderingcontext of the flexbean and pass it to getIndexedchild method programmatically.....
    Thanks in Advance,
    Tanveer

  • How to programmatically access XControl Methods

    I have developed a XControl that includes several internal methods. I would like to programmatically invoke these methods from outside the XCtl but I can't find a way to programmatically obtain an appropriate XCtl reference (i.e. one that allows access to these methods). Among other things, I have tried using the OpenG VI "Open VI Object Reference" which gives the correct reference but no access to the internal methods (probably cos it doesn't recognize XCtls as an allowable vi object class).
    Any help or suggestions would be greatly appreciated.
    Andrew

    Hi DrewBob,
    I can't reproduce the issue you're seeing. I can indeed access properties and methods for an Xcontrol from its reference inside a subVI.
    In any case, you can definitely get around this by following these steps. This is overkill, and these steps weren't necessary for me, but should ensure that you can do what you want:
    1. Create a reference to your Xcontrol. Right click the reference and select Create >> Control. Right click the new control and select Advanced >> Customize.
    2. In the Control Editor window, select Type-Def from the control type drop down menu. Save this type-def control reference.
    3. For the reference input in your subVI, use a generic control reference. You can find one of these in the controls palette under Modern Controls >> Refnum >> Control Refnum.
    4. Now wire that reference in your subVI into a To More Specific Class subVI. Place a copy of your control reference type def on the block diagram of the subVI and wire its output into the Target Class input. The resulting reference should resemble the picture below and will contain all necessary custom properties and methods. Furthermore, you could use a case structure and use this one VI to alter multiple different kinds of Xcontrols using one control reference input.
    If this doesn't work for you, could you post a small VI (or zipped project) that demonstrates the problems you are having?
    Message Edited by Jarrod S. on 03-27-200611:50 AM
    Jarrod S.
    National Instruments
    Attachments:
    ToMoreSpecificClass.JPG ‏12 KB

  • Is there a way of programmatically accessing fault/error/BIT information from the PXI-6723 during runtime?

    In fact can you access fault information for all PXI cards?  How do i detect that there is a fault with a board from within the software so i can report this to a higher level application?
    Thanks
    Martin

    Hi Robert,
    So in essence what you're saying is that if a component on the device fails there is no way to know this as long as the device is still communicating with the PC? It would appear that the Self Test function is a bit of a misnomer - it doesnt actually do what it says on the tin.
    So which of the 2000 errors can actually be returned by this function call?  I appreciate that there are a broad range of errors but I would like to know which one(s) can in reality be returned by this function.  I need to somehow categorise the errors into whether or not the device is healthy so i can communicate this to our customers software (wo have no knowledge of internal NI error codes) so they can decide whether the board needs replacing.  Of the 2000 error codes which of these could potentially relate to a hardware failure of some sort as opposed to a software configuration error.
    I have found this thread which details some error codes on a NI 446X device (is there something like this for all errors on all devices?):
    http://digital.ni.com/public.nsf/allkb/95328C2FAF9DA99A862576E200785C11?OpenDocument
    Lastly where in the NI DAQ help references are the list of error codes and meanings as listed in NIDAQmx.h.  For instance what does DAQmxErrorPALThreadControllerIsNotThreadCreator actually mean?  I don't want to wait for the error to occur in my system before I get information on what it means - it would be useful to know and understand before I write the software what errors may occur on each device.
    Thanks
    Martin

  • Programmatic access to multiple backend systems using adaptive RFC

    Hello,
    The following  link http://help.sap.com/saphelp_nw04/helpdata/en/af/84a34098022a54e10000000a1550b0/content.htm talks about the support to map multiple backend systems by specifying the backend system as URL parameters in a webdynpro application.
    For example:
    http://<hostname>:<port>/webdynpro/dispatcher/local/ESSProject/ESSApp?
    sap.wdarfc.useSys=WD_MODELDATA_DEST:ABC&
    sap.wdarfc.useSys=WD_RFC_METADATA_DEST:ABC
    Is it possible to programmatically change the backend systems the application connects to? in other words can a single application while executing connect to different backend systems by dynamically changing the model parameters?
    (This should be possible without the portal in the picture)
    Cheers,
    Praveen

    Hi,
       [This|JCO connection to multiple R/3 Back end system; might help especially the reply from Bertram Ganz.
    Regards,
    Satyajit.

  • How do I programmatically access the Color Highlight options in a chart?

    I want to access the information of which bars are highlighted under which conditions in my bar chart. Is there a way to programatically access this info, either with the RAS API or the old Engine.ChartObject API?
    Thanks in advance!

    The Chart object is a third party product and unfortunately, at runtime, you are quite limited with what you can do with the chart object. There are no API's available in any version of CR to get to the line colors and other options. See htis thread for more details:
    https://forums.sdn.sap.com/click.jspa?searchID=17899026&messageID=6102644
    Ludek

  • Programmatically access DMQ in Sun AppServer

    Hi,
    I'm trying to write an automatic recovery tool to recover messages from the DMQ in Sun AppServer (mq.sys.dmq).
    I was able to connect to the queue and browse (QueueBrowser) the messages present. I even can reuse the messages to re-post them to the correct queue, but I can't find a way to remove messages from the queue. I want to remove them programmatically, if possible one by one.
    Adding a QueueReceiver seemed to work, but it would not receive any of the message already present on the DMQ.
    Can anyone help me out with this issue?
    Regards,
    Bart

    I know this is an old post, but this could help :
    There is no problem to receive messages already in the DMQ.
    Just don't forget to do a jmsConnection.start(); before to dmqConsumer.receive(...);

  • Programmatic access only license question

    Hi,
    I know this question was discussed already before but it's still quite unclear to me and I want to be 100% that we won't break licence agreement.
    Our case is simple - one Adobe Photoshop instance used only for executing scripts and exporting results to couple of pngs. It would run purely "on server" and execute only one task (script) at the time. After it finishes, it would run another scripts and so on. There will be only one "user" using this instance at the time. The only difference is that "user" is our application which would invoke Photoshop instance programmatically. Is it possible from license perspective? Which licence should we buy ?
    Many thanks
    J

    Oliver,
    No. This tool is free. You should also use the latest Migration Workbench incorporated into Oracle SQL Developer 1.2 (also free)
    Donal

  • Programmatic access to SequenceCallModule.SequenceFilePath

    Hi there,
    I was experimenting wtih ActiveX steps accessing SeqeunceCallModule. If the UseCurrentFile is TRUE,  SequenceFilePath is an empty string. If I uncheck UseCurrentFile in SeqEdit and put in the seuqence file's path and recheck UseCurrentFile, the following programmtic accesses to SequenceFilePath holds the corresponding string. This behaviour kind of caused me some trouble because I expected SeqeunceFilePath to hold the path, even if UseCurrentFile is checked... that's what it's like with expectations...
    I've kind of worked around this issue, but I'd like to know if this behaviour is intentional?
    Cheers
    Oli
    Programming languages don't create bad code, programmers create bad code....

    The property SequenceFilePath "remembers" the last path you entered or wrote via the API. If you set the UseCurrentFile to TRUE, the value is ignored, but not overwritten. ther same happens in the Sequence-Editor. if you enter a string, then check the UseCurrentFile Flag, and uncheck it again, the entered path appears again.
    So this is the intentional behaviour.
    To get the path of the used sequence file you would have to check the UseCurrentFile flag first. If it is checked, use the path of the used sequence, if it is unchecked, get the SequenceFilePath property.

  • Programmatic access to ODI metadata

    Hi all,
    is there API/SDK in ODI for metadata access?
    For example:
    1) documented ODI repository structure or public views;
    2) using Jython for manipulating metadata;
    3) etc.
    Thanks,
    Oleg

    Hi Mukund,
    Please check this SAP Note <a href="http://www.service.sap.com/sap/support/notes/199123">199123</a> (Word Settings).
    It explains how to avoid this error message.
    Best regards,
    Ruediger

  • Programmatic access to the Word Accessibility Checker

    Hi,
    I'm attempting to find a way to launch the Word Accessibility Checker from VBA or .NET code, manipulate which rules it is using and ideally have a collection of all the issues discovered.
    I know the rules can be manipulated via group policy (see https://technet.microsoft.com/en-us/library/ff602182.aspx) but this is not appropriate to our situation.
    Any help or direction will be greatly appreciated.
    thanks, Mark

    Hi Mark,
    Based on the description, you want to launch the Word Accessiblity Checker from code.
    As far as I know, the Word object model doesn't expose this function at present. You can get more detail about it from link below:
    Object model reference (Word 2013 developer reference)
    If you want to the Word object model to expose this function, I suggest that you submit the feedback from link below:
    Submit Feedback - Microsoft Support
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for