Set starting folder [SOLVED]
-
On 21/02/2016 at 03:22, xxxxxxxx wrote:
I know two ways to search for a folder, but I do not how to set the folder where to start the search.
For example, search for a folder in c:/temp?Both ways do not start with c:/temp
path = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_ANYTHING, "Please choose a folder", c4d.FILESELECT_DIRECTORY, "", "c:/temp")
settings = c4d.BaseContainer() settings.SetBool(c4d.FILENAME_DIRECTORY, True); self._filename = self.AddCustomGui(10112, c4d.CUSTOMGUI_FILENAME, "", c4d.BFH_SCALEFIT, 50, 10, settings) self.SetString(10112, "C:/temp/")
-
On 21/02/2016 at 07:06, xxxxxxxx wrote:
Windows and Macs use different escapes (\\ vs. /) which can easily cause problems.
Try it like this:
import c4d def main() : path = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_ANYTHING, "Please choose a folder", c4d.FILESELECT_DIRECTORY, "", "c:\\temp") if __name__=='__main__': main()
-ScottA
-
On 21/02/2016 at 11:24, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Windows and Macs use different escapes (\\ vs. /) which can easily cause problems.
Yes, I learned that the hard way.
Unfortunately that is not the solution.
The search does with "c:\ emp" or "c:/temp".
I even tried "c:/temp/"Thanks, Pim
-
On 21/02/2016 at 12:57, xxxxxxxx wrote:
That's strange.
The code I posted opens a file browser with the emp folder selectedI'm using R13. Maybe something has changed?
-ScottA
-
On 22/02/2016 at 00:31, xxxxxxxx wrote:
Sorry,you are correct, c:\ emp is selected, but not as the top one.
I see a huge folder tree and then scrolling done I see c:\ emp is indeed selected.
I would like cinema to scroll down and show the selected folder on top.
Also the folder is only selected, not opened.-Pim