• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Javascript - Custom file path

    Feature Requests
    3
    8
    2002
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Juriaan
      Juriaan Tech Staff last edited by

      Hi there all,

      The Javascript actor is something that I use quite often. The thing that is making it a bit of a frustating experience for me as an artist is that the IDE that is provided is not optimal at all. 

      I would love to see a way to load in external files by either a External File bin or by a external file path. (Like the Data Array). That way I can use my own IDE (Sublime Text) that has some core features that are currently missing in the IDE.

      Isadora 3.1.1, Dell XPS 17 9710, Windows 10
      Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
      Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

      1 Reply Last reply Reply Quote 0
      • D
        DillTheKraut last edited by DillTheKraut

        Hello @Juriaan,

        I'm not sure if it is what you need. But I already do read text files with Javascript. I just use 

        var txt = read (arguments[0]);

        and put the file path into the input.

        This reads the whole file into the variable for further use.

        I did a reader that can load EDL (edit lists from Timeline based Video edit Software) and working now on reading Subtitle texts.

        https://community.troikatronix...

        Best

        Dill

        Edit: corrected code

        DusX 1 Reply Last reply Reply Quote 1
        • Juriaan
          Juriaan Tech Staff last edited by

          Hi there,
          No, I was not talking about TXT files, I wish to load in a JavaScript file, and I believe this is more of a User Experience request ;)

          - Juriaan

          Isadora 3.1.1, Dell XPS 17 9710, Windows 10
          Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
          Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

          1 Reply Last reply Reply Quote 0
          • Juriaan
            Juriaan Tech Staff last edited by

            For example a pain is in the current IDE is that if you wish to tab a few lines of code your entire code will be removed.


            Steps to recreate :

            - Select a few lines of code

            - Press tab

            - Boom. Your code is gone.

            While in other IDEs you can do that just fine, and it will add a proper tab before the lines that you selected.

            Isadora 3.1.1, Dell XPS 17 9710, Windows 10
            Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
            Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

            D 1 Reply Last reply Reply Quote 0
            • D
              DillTheKraut @Juriaan last edited by DillTheKraut

              @juriaan, I got you now.

              What you want is more script editor functions!? Maybe for now you could use a separate script editor with special functions and always copy - paste the whole script. I use Atom on OSX. It does have a lot of plugins for special features like the ones you mentioned.

              Edit: Ok, you just want to avoid the copy - paste and have Isadora load the Javafile in realtime?

              1 Reply Last reply Reply Quote 0
              • Juriaan
                Juriaan Tech Staff last edited by

                Yep. I want to press Save in Sublime Text or Athom, and that Isadora will load in the new file ;)

                Isadora 3.1.1, Dell XPS 17 9710, Windows 10
                Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
                Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

                DusX 1 Reply Last reply Reply Quote 0
                • DusX
                  DusX Tech Staff @DillTheKraut last edited by

                  @dillthekraut

                  You may find this script useful: https://community.troikatronix...

                  Troikatronix Technical Support

                  • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                  • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                  • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                  Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

                  1 Reply Last reply Reply Quote 1
                  • DusX
                    DusX Tech Staff @Juriaan last edited by

                    @juriaan

                    In Javascript we have 2 methods for loading external files.

                    Read(), and Include().

                    with Include(), it reads and parses the text with the Javascript engine, and the text must be valid javascript (as used in: https://support.troikatronix.c...)

                    SO, you can simply enter into a JS actor:

                    include('mycode.js');

                    and that single line will load your external script and have the JS engine parse it.. of course it needs to include a main() etc..
                    Then you can work in your code editor (sublime text) along side Isadora. When you save in Sublime, you will need to have Isadora refresh the 'include'.
                    There are 2 ways to do this, that I know of. 
                    1: exit and reenter the scene.
                    2: Use a 'User Actor on/off' to toggle the state of the scene (forcing a refresh) (this actor is not available in the main scene level, but can be cut and pasted from a user actor..  very handy)

                    Of course this is not seamless integration, but it works pretty well.
                    I would also like to see the option of a JS actor where the required input is a file name/path and a trigger opens your code editor of choice (from preferences).

                    Troikatronix Technical Support

                    • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                    • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                    • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                    Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

                    1 Reply Last reply Reply Quote 4
                    • First post
                      Last post