Пример #1
0
def toggle_toolbargroup(rui, group):
    if not os.path.exists(rui) or not os.path.isfile(rui):
        return
    collection = rs.IsToolbarCollection(rui)
    if not collection:
        collection = rs.OpenToolbarCollection(rui)
        if rs.IsToolbar(collection, group, True):
            rs.ShowToolbar(collection, group)
    else:
        if rs.IsToolbar(collection, group, True):
            if rs.IsToolbarVisible(collection, group):
                rs.HideToolbar(collection, group)
            else:
                rs.ShowToolbar(collection, group)
Пример #2
0
from __future__ import print_function
import rhinoscriptsyntax as rs
import os
import time

name = "Deadline V-Ray DBR"

if name not in rs.ToolbarCollectionNames():
    file = "DEADLINEFILELOCATION"
    print(rs.OpenToolbarCollection(file))
    rs.Command('-Toolbar T "%s" S "%s" Y Enter Enter' % (name, name))
else:
    print("Deadline V-Ray DBR toolbar already installed!")

rs.Exit()