getModulatorsWithProperty

Home Forums General Programming getModulatorsWithProperty

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #25755
    zeokazeoka
    Participant
    • Topics: 73
    • Replies: 466
    • Total: 539
    • ★★★

    how get this working and after how to set properties by blocs ?
    getModulatorsWithProperty(“modulatorCustomIndexGroup”,1,7)
    1 is the index 7 the number of mods to modify : that’s wrong !!
    Any idea ?
    Could reduce strongly “visbility” scripts..

    #25761
    dasfaker
    Keymaster
    • Topics: 79
    • Replies: 786
    • Total: 865
    • ★★★

    The correct way is getModulatorsWithProperty(“modulatorCustomIndexGroup”,1)

    You cannot select only some of them this way.

    #25767
    zeokazeoka
    Participant
    • Topics: 73
    • Replies: 466
    • Total: 539
    • ★★★

    tried..
    it seems no
    it needs something else ,a second int ?
    CtrlrPanel&,String const&,String const&

    it said no matching overload found…. as if there no mods with custom index 1
    but they are

    • This reply was modified 6 years ago by zeokazeoka.
    #25769
    atomatom
    Participant
    • Topics: 157
    • Replies: 2943
    • Total: 3100
    • ★★★★★

    Both parameters to the method are string so type “1” instead of 1.

    getModulatorsWithProperty(“modulatorCustomIndexGroup”,”1″)

    i just checked and there seems to be a fault in the logic, it will return an array the size of ALL modulators with valid modulators placed in the array, i changed it so that it returns an array of just the matching modulators not ALL modulators with invalid ones set to nil.

    You can use that method, just check each element if it’s not nil.

    #25774
    zeokazeoka
    Participant
    • Topics: 73
    • Replies: 466
    • Total: 539
    • ★★★

    In this array what is there ?
    I tried this

    FILTER2 = function(mod, newValue)
    d = panel:getModulatorsWithProperty("modulatorCustomIndexGroup","1")
      if newValue == 0 then z = false 
    else                    z = true
     end
     for g = 1,7,1 do 
         string.format("%s",d[g]):getComponent():setVisible(z)
     end
     
    end

    How could I group task ? I tried to diplay the table in the console but failed
    custom group names and indexes are great features

    #118283
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 499
    • Total: 540
    • ★★★

    Did anyone succeeded to have this function working? Tried without success, returned table is always empty…
    Setting Custom group index to some modulators to 1
    then in Lua:

    tSub={}
     tSub = panel:getModulatorsWithProperty("modulatorCustomIndexGroup","1")
     console(tostring(#tSub))

    Always giving a size of 0, whatever property I’m trying 🙁
    I have also checked the Github code and it seems OK (scans all modulators and make a match on property and value to store in an array)

    #118295
    protonproton
    Participant
    • Topics: 19
    • Replies: 91
    • Total: 110
    • ★★

    Hi goodweather,

    works fine here (PC ver 5.3.201).

    EDIT: I was too fast 😉 Nope, it seems it is still not working. After changing the value from “0” to “1” it shows 0 what is not true. So basically the same result as you had.
    Cheers!

    • This reply was modified 2 months ago by protonproton.
    Attachments:
    You must be logged in to view attached files.
    #118306
    goodweathergoodweather
    Participant
    • Topics: 41
    • Replies: 499
    • Total: 540
    • ★★★

    Thx to confirm, my friend!
    I’m now doing the scanning of all modulators myself and it works fast

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
There is currently 0 users and 27 guests online
No users are currently active
Forum Statistics
Threads: 2,394, Posts: 16,752, Members: 59,355
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!