1. #1
    Member Follow User Gallery
    Join Date
    Mar 2012
    Location
    Dallas, TX
    Posts
    30

    Default Question: NoteISwitch command

    My ultimate goal: Allow user to select options (using the NoteISwitch command) before rendering and exporting images. Options will include BPR On/Off, Floor On/Off, Perspective On/Off, Color Pass, Depth Pass, Shadow Pass, etc, etc.

    I'm using the NoteISwitch command inside a note. So far I have 2 buttons setup ... one labeled "Floor On/Off" and another labeled "Perspective On/Off". Now I'm trying to figure out the path of these buttons. I need know if the button is selected or not.

    An example of the behavior I'm looking for:
    1. User selects desired options
    2. User selects execute
    3. When it executes, look at each option (for example "Perspective On/Off") and determine if it is selected of not
    4. If the switch button is selected, turn Perspective on (IPress,Draw:Perspective)

    Outside a note you just look up the path of the Switch button you've created. I'm not sure how to find the path of the button when it is in a note. Is this possible?

    [CODE]
    //Variables
    [VarSet,hPos,5]
    [VarSet,vPos,30]


    //Routines
    [RoutineDef,NoteInterface,

    //background image - the other buttons are positioned relative to this
    [NoteIButton,,,,1,1,1,210,350,,,0,,1]

    //Options Title Bar
    [NoteIButton,"Options",,,1,hPos,vPos,200,20, (185+(139*256)+(107*65536)),0, , , ]

    //Floor label
    [NoteISwitch,"Floor ON/OFF" , , ,,hPos ,vPos+25 ,200 ,20 , , , , , ]

    //Perspective label
    [NoteISwitch,"Perspective ON/OFF" , , ,,hPos ,vPos+50 ,200 ,20 ,, ,, , ]

    //Execute button
    [NoteIButton,"Execute" , , ,,20 ,350 ,75 ,25 , ,0xffa000 ,, , ]

    [Note,"==== Title of Note ===="]

    ]//end routine

    //Create button
    [IButton,"test","test",
    [RoutineCall,NoteInterface]
    ,,.5
    ]//end test button
    [/CODE]

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    The numerical ID (basically its place in the list) for the NoteIButton is the return value of the final Note. There's an example at the bottom of this page that will show you how it's done:

    http://docs.pixologic.com/user-guide...ote-interface/

    HTH,

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •