THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/04/2011 at 15:48, xxxxxxxx wrote:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
Shawn has been trying to help me figure out how to merge a file into my scene.
But it's not working for me for some reason:
Filename file = GeGetPluginPath() + "C:/Users/user/Desktop/test.c4d"; MergeDocument(doc, file, SCENEFILTER_MERGESCENE, NULL); LoadFile(file);
I get no errors. But nothing happens when I execute the plugin.
On a possibly related issue. When I try to create a dialog window for the user to pick a file from.
I cannot make the dialog window start from a specific folder:
Filename file; Filename dir = GeGetPluginPath() + "C:/Users/user/Desktop"; //the dialog should start at this folder. But doesn't. file.SetDirectory(dir); file.FileSelect(FILESELECTTYPE_SCENES, FILESELECT_LOAD, "Choose a file"); LoadFile(file);
The dialog window always opens up from a previously opened folder. And is ignoring the GeGetPluginPath() + "C:/Users/user/Desktop"; code.
Since the dialog window code isn't finding my path. I can see how this would also prevent the Merge code from working too.
So my question is....Why is my path code not working. When it seems to work for everyone else?