• 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

    [ANSWERED] How to Set the Scale Min/Max of Inputs in Pythoner Actor?

    How To... ?
    3
    4
    74
    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.
    • Aolis
      Aolis last edited by Woland

      Hi there,

      I'm working with the Pythoner actor and I'm trying to figure out if there is a way of indicating that an input should have a particular range to start with inside the python code?

      I'm able to get it to make different kinds of inputs but they always populate as "0". . . . 

      Any guidance would be great.

      Thank you!

      -=Alex=-

      (edit: added extra words for more clarity)

      Media Artist & Teacher
      MacBook Pro, Apple M3 Max, 128 GB
      Sonoma 15.7.2

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

        @aolis

        Pythoner basically passes values from Isadora into your Python script as raw Python objects. There is:
        ❌ No built-in type system for inputs/outputs
        ❌ No way to declare types like “this input is always an int” at the actor level
        ✅ Only positional passing of values

        With that said, you use the standard method of mutating your inputs/outputs to the expected types. 

        Additionally in your python code it is useful to test the type of inputs to ensure proper function. (I honestly don't do this often because I'm quite careful with my input connections. Using user actors to contain my pythoner scripts makes this even easier because you can set the type of the user inputs before attaching them).

        You might look into using:

        # Validate types
        if not isinstance(my_input, expected_type):
            # convert or handle error

        # Convert if needed
        my_input = int(my_input)  # or float, list, etc.

        This allows you to test incoming values in your python_init() function

        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.

        Aolis Woland 2 Replies Last reply Reply Quote 1
        • Aolis
          Aolis @DusX last edited by

          @dusx

          Copy this. 

          Thank you for this information. I appreciate it. :)

          Media Artist & Teacher
          MacBook Pro, Apple M3 Max, 128 GB
          Sonoma 15.7.2

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

            @dusx said:

            With that said, you use the standard method of mutating your inputs/outputs to the expected types. 

             @Aolis 

            These User Actors of mine can be quite useful for that: https://troikatronix.com/add-ons/mutator-user-actors/

            TroikaTronix Technical Support
            New Support Ticket: https://support.troikatronix.com/support/tickets/new
            Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
            Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
            Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

            | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

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