bypass using scripting

   3415   1   2
User Avatar
Member
58 posts
Joined: July 2005
Offline
i'm using this command : opset -b on/off /obj/geo1/mysphere1
to turn ON/OFF the bypass flag of mysphere1.
but first i need to check :
if the flag is OFF i will make it ON and if it's ON i will make it OFF
i'm using IF … THEN , but i don't know what function i have to use to check the bypass state that can return 0 is it's OFF and 1 if it's ON.

my bypass function look like this:
if (???? – need function here to check –???? ) then
opset -b on /obj/geo1/mysphere1
else
opset -b off /obj/geo1/mysphere1
endif

anyone have any clue?

i create a subnet and mysphere is inside this subnet. anyway i'm gona make a scenario where i can turn off/on mysphere. i mean not just on/off the display but take it out so the subnet will exclude mysphere from calculation to output subnet . for this purpose, i create a new op from the subnet , add new toggle parameter, then i call that bypass function within ‘callback’ parameter. so when i apply, i can click the toggle button to on/off the target obj.
is it a good idea? does anyone know any other method to call the function?

regards,
clay~
User Avatar
Member
321 posts
Joined: July 2005
Offline
clay
i'm using this command : opset -b on/off /obj/geo1/mysphere1
to turn ON/OFF the bypass flag of mysphere1.
but first i need to check :
if the flag is OFF i will make it ON and if it's ON i will make it OFF
i'm using IF … THEN , but i don't know what function i have to use to check the bypass state that can return 0 is it's OFF and 1 if it's ON.

my bypass function look like this:
if (???? – need function here to check –???? ) then
opset -b on /obj/geo1/mysphere1
else
opset -b off /obj/geo1/mysphere1
endif

anyone have any clue?

i create a subnet and mysphere is inside this subnet. anyway i'm gona make a scenario where i can turn off/on mysphere. i mean not just on/off the display but take it out so the subnet will exclude mysphere from calculation to output subnet . for this purpose, i create a new op from the subnet , add new toggle parameter, then i call that bypass function within ‘callback’ parameter. so when i apply, i can click the toggle button to on/off the target obj.
is it a good idea? does anyone know any other method to call the function?

regards,
clay~

To bypass some SOPs inside an OTL, you'll probably need to use a switch SOP, and link the selector to a toggle in the OTL's UI. I haven't had too much luck with bypassing OPs inside OTLs, as they're actually references, and as such can't be modified, i.e you can't change the display flag, bypass flag, etc. (at least, in my experience). Now, this only applies to OTLs where the contents are uneditable.

Or, the simple version is:

opset -b toggle /obj/geo1/mySop

– Antoine
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
  • Quick Links