AndrewVK Posted February 5, 2008 Share Posted February 5, 2008 Is it possible to provide file choice dialog with the default filename??? I am trying this, but it have no effect camName = cam.name() defname = camName + '.jsx' dirpath = hou.expandString('$HIP') fname = hou.ui.selectFile( start_directory = dirpath, file_type = hou.fileType.Any, default_value = defname, collapse_sequences = False, multiple_select = False, image_chooser = False) Is it possible to prevent user from selecting objects other than camera not only in "Scene View" but also in Net or Tree view I am trying this cam = viewer.selectObjects("Select a camera and press Enter", use_existing_selection=False, quick_select=True, allowed_types = ["cam"])[-1] It works in scene view, but i still can select everything in net view Quote Link to comment Share on other sites More sharing options...
AndrewVK Posted February 7, 2008 Author Share Posted February 7, 2008 problem with filename solved... dir = hou.expandString('$HIP') dirpath = dir + '/' + camName + '.jsx' fname = hou.ui.selectFile( start_directory = dirpath, file_type = hou.fileType.Any, collapse_sequences = False, multiple_select = False, pattern = '*.jsx', image_chooser = False) if not fname.endswith('.jsx'): fname = fname + '.jsx' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.