0

I would like to modify an internal file but I don't know how to replace it. Indeed, I want to modify a script in Templates>Python>Operator File Import but I don't find a way to do it in the text editor. Maybe it's obvious, in fact I also don't find my answer in the existing questions. Thank you in advance.

Sazerac
  • 4,619
  • 4
  • 20
  • 33
art2611
  • 97
  • 1
  • 6
  • I think that template files cant be modified, what you may do instead is to copy the content of the template file in a new text block and tweak it there – cnisidis Jul 23 '19 at 21:47
  • You think I can keep the main part of the template in a new text block (or in an extern script I guess ?) and make them both run will not be a problem ? Thank you for your answer – art2611 Jul 23 '19 at 21:56
  • It appears this is in relation to https://blender.stackexchange.com/a/146160/15543 which is a case of, quoting @Sambler, using it as a "starting point" when creating another script. The template isn't modified, the script is a modified version of it. Save the modified script, with .py extension and install as addon, or simply save in blend file and run the script from the text editor. – batFINGER Jul 27 '19 at 15:02

1 Answers1

0

The templates files are only meant to be used as starting points, you don't need to replace any of them.

In blenders text editor choose the Templates->Python->Operator File Import, modify the contents in the text editor and save it to a file using Text->Save As. The best place to save the file would be in your config folder. You could save it to your desktop and use the Install Addon From File button.

Once you have saved it into your configs addon folder, you can enable the addon in your preferences and use your import addon.

sambler
  • 55,387
  • 3
  • 59
  • 192