8,484
edits
Paradox-01 (talk | contribs) mNo edit summary  | 
				Paradox-01 (talk | contribs)  mNo edit summary  | 
				||
| Line 53: | Line 53: | ||
: So in theory it is possible to [https://www.youtube.com/watch?v=eCvuQHlKPEk edit the Blender source code] to add an dnd file importer.  | : So in theory it is possible to [https://www.youtube.com/watch?v=eCvuQHlKPEk edit the Blender source code] to add an dnd file importer.  | ||
:: It seems BLEND is currently the only file type where dnd is truly supported. This could give a hint where to look into the source and add more types.  | :: It seems BLEND is currently the only file type where dnd is truly supported. This could give a hint where to look into the source and add more types.  | ||
| Line 150: | Line 148: | ||
[...]  | [...]  | ||
===Building Blender===  | |||
 https://wiki.blender.org/wiki/Building_Blender  | |||
 https://wiki.blender.org/wiki/Building_Blender/Windows  | |||
* https://www.youtube.com/watch?v=eCvuQHlKPEk  | |||
* vid that gives an overview of the source code: https://www.youtube.com/watch?v=tCdx7gzp0Ac - for example they show where to find command line args  | |||
 cd C:\blender-git\blender  | |||
update files  | |||
 make update   | |||
(re)create build, the first build will take a couple of minutes, further builds take about a minute or less  | |||
 make  | |||
===wm_window.c ===  | |||
blender-with-libraries-3.1.0\blender-3.1.0\source\blender\windowmanager\intern\wm_window.c  | |||
A simple test of opening a dropped file with notepad:  | |||
  char processFile[255];  | |||
  if (ddd->dataType == GHOST_kDragnDropTypeFilenames) {  | |||
          GHOST_TStringArray *stra = ddd->data;  | |||
          for (int a = 0; a < stra->count; a++) {  | |||
            printf("drop file %s\n", stra->strings[a]);  | |||
            strcpy(processFile, "notepad.exe " );  | |||
            strcat(processFile, stra->strings[a] );  | |||
            system(processFile);  | |||
 ...  | |||
 }  | |||
Notepad will open with dropped file. Blender will hang and possible crash if Notepad is not closed.  | |||
So, either the dropped files need to be processed right away or that part must be made independent using fork or create process ...  | |||
* https://docs.microsoft.com/de-de/windows/win32/procthread/creating-processes  | |||
edits