• 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

    SOLVED How to Set the Scale Min/Max of Inputs in Pythoner Actor?

    How To... ?
    2
    3
    46
    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 Aolis

      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 python or 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 you 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 1 Reply 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
          • First post
            Last post