Jump to content
You must now use your email address to sign in [click for more info] ×

X-Raym

Members
  • Posts

    99
  • Joined

  • Last visited

Posts posted by X-Raym

  1. @R C-R  the "Lots of privilege" stuffs basically means access to file systems function, for eg having a script to import all files in a directory into the composition, name and color layers based on CSV file, or to export certain layers etc. It would be nice but it is not as crucial as standards layers properties (name, size, color...) for which we could do a lot of nice things without extra privileges.

    Thanks for pointing the @TonyB answers, it is a while ago but it gives hope !

  2. @R C-R You are totally right, but I think as a user we have to give feedback about what we would find useful. The sure thing is that if no one is requesting API, it will not happen. It may be illusory, but I think it worth it, pointing good usage cases of API could make them change their mind at some points. So many things could be solved with an extra limited sets of functions. It would be hard but not impossible.

    Sure, bug fixes and enhancements are the priority for everyone, I won't argue with that.

  3. Hi !

     

    This thread is a follow-up of the discussion we had on another thread, to summarize and clarify the ideas: Q: Compress or Expand selected objects positions ?

     

    Context

    I was looking for a way to compress or expand selected items positions with Transform Tool on a multi objects selection transform area, but I didn't find one.

    It would in fact behave exactly like the Transform tool when changing scale, but instead of changing scale and anchor points positions, it would only change anchor points positions (so in the end, it will scale items apart/closer from/to each others).

    This would allow to compress / expand spaces between objects, around the Transform area anchor points, which can be extremely efficient to make objects closer or farther together without having to modify their positions individually. The more objects are involved, the more useful and necessary this feature get. It prevent lots of clicking and dragging which would be extremely useful for accessibility as well.

    The FR could be resolved as a custom modifier keyboard shortcut (CTRL + ALT or something) with Transform Tool, or a dedicated Transform Tool mode switch on the toolbar (like a "preserve scale" button).

     

    Demo

    Here is a demo (see how shapes are now close together - dark red - but scale didn't changed. Only anchor point positions):

    2020-05-08_15-15-54_capture_Affinity_Designer.png.d4116ffa45879d9481b5e77a8555431a.png

    Workaround

    Here is the current workaround for that It works but it is not very satisfactory as it is quite slow and require copy pasting etc.

    1. select items
    2. note one object width as ref,
    3. scale with transformation tool,
    4. then set transformation to object independently,
    5. enter the initial value in width

    Here is a demo video of this:

     

     

    Thank you for considering this request, it would be awesome ! Bringing object closer/farther together is I guess a common task in everyone projects :)

    Cheers !

  4. @R C-R

    Offense non taken but I thought that a code exemple would help you see that on scripting side, the non object approach can works just as well.

    I'm a professional dev, and I mostly do scripting for other apps. The protocode exemple indeed dont work but are direvt port of other scripts in some apps I used, it doesnt come from nowhere.

    For the variable type, some language can create special variable types which are not number, string, array or object. In Lua these are called 'userdata' type. It is not Object Oriented programming, these dont have their own functions or properties. It just make data sanitization a bit easier. (a simple variable type check).

    but I my exemple, it could simply based on ID number, it would works just as well. In some software I use there is both approaches.

    Again this is slightly off topic. We should join an API related thread for these code debate.

    But mostly we have to hear from Affinity devs themselves. So we can know if our needs are taking into account :)We'll take anything we offer !

     

  5.  @R C-R @R C-R

    It is true that adding API is a lot of works. Though it will open the apps to news features and it audience and audience satisfication will increase widely.

    Object based or not on the scripting side it doesnt matter that much. I script for software wich have each or the other API style and it is same difficulty level.

    If you really want to speak about code, here are two exemple with proto-code (not actual code but coding style demo. I use Lua syntax as ref).

    https://gist.github.com/X-Raym/8936e950ad4441208ace57845a373346

    See how little difference it makes on script side.

  6. @R C-R Sorry a bit of confusion in my explanations, between "code" object and "project object" (shapes in Affinity Designer, Item in Reaper :P).

    I was referring to what is called "item" on reaper project timelines, apart on my last sentence. But these are not code objects (they don't have methods, constructor etc), they are just like ID pointers.

    I'm all about talking about scripting but this may be out of scope of this particular thread (as we don't have scripting)

  7. @R C-RI use an audio software called REAPER for which I coded hundreds of scripts.
    I can assure that API doesn't need to reveal anything from the app source code. API are just list of functions basically.

    As it offers scripting in various language (Python, Lua, C++, EEL...), the choice what to not have any objects. So it only returns points, or value directly.
    For EG, when you call an object, you get the object ID.
    And then you can pass this object object ID to a function get certain values about this object (like GetItemPosition() ). And you have Setter functions which allows to have and Object ID and the desired value (like SetItemPosition() ). There is also more generic function like  GetItemParamValue( item_id, param) for which you can specified lots of different param, but ultimately, there is no object involved.
    It is still very efficient and easy to code.

    But I guess this should have to be discussed in a dedicated API request thread :P

  8. @GarryP You are right Constraints is not the right tool, but your clearly understand the request : having shapes, compressed or expand them on some axis like with Transformation tool, but without altering scale (just changing anchor points).

    This could be useful in a lots of situation really.

    • Compress the space between two eyes objects on a character face while being sure they are well spaced according the middle symmetry axes (Align tool doesn(t work here because it spread from the object on the left, not from center of selection),
    • or spacing planets and stars vector elements (the Align tool will be not useful here cause it has only fixed value).
    • etc...

    I can really see myself using that a lot. Just like the scale tool.

     

    The most handy workarround so far is to

    1. select items
    2. note one object width as ref,
    3. scale with transformation tool,
    4. then set transformation to object independently,
    5. enter the initial value in width


    It works but it doesn't have the benefit of live preview like Transformation tool.

     

    Here is a demo: https://monosnap.com/file/tP4wN2lgvVlhhkEiqqhLCR9l4kN5oy

    (not sure how to embed photo on the forum, so here is final screenshot results, before and after:

    gj97miE.png

     

    Having a Transformation tool option just for that would make it work like a breathe. :)

  9. Quote

    If you put the shapes in a larger layer – such as a rectangle with no stroke or fill – that might be better.

    @GarryP It's a bit weird, the group layer size seems to adjusted to what was the width of the future group before it's creation : if I resize the rectangle after group creation, Group width and Height will still be equal to what the rectangle was before.

    I guess with few adjustment we might get close to what I need, but these workaround (having to set constrain individually on each objects, having to have them in a group) is  a bit more complex that simply using a tool like transform tool. I think a Feature request will be very welcome :) And your screenshots will deeply help to explain what it is all about.
    How shall we call such feature request ?

     

    Maybe "Spread" object positions ? Multiply ? Not sure what keywords would be the most relevant (obviously my thread title was a bit off).

  10. @GarryP

    Maybe I miss an obvious way to move without scaling a lots of items toward a center point.

    Am I correct to assume you speak about the regular way of moving object (click select a object, move it a bit, click select another, move it a bit in opposite direction ?)
    If yes in this case, consider the case where there would be 100 scattered items (like 100 random circle on a canvas), to compress (only spaces) on X and Y axis. :)

    Maybe you want a demo screenshot of what I need ?

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.