File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ def _setup_options(self, options: NTPOptions) -> bool:
135135 self ._version = options .version
136136 self ._location = options .location
137137 self ._license = options .license
138+ self ._should_create_license = options .should_create_license
138139 self ._category = options .category
139140 self ._custom_category = options .custom_category
140141 if options .menu_id in dir (bpy .types ):
@@ -1386,6 +1387,8 @@ def _create_main_func(self) -> None:
13861387 self ._write ("register()" , "\t " )
13871388
13881389 def _create_license (self ) -> None :
1390+ if not self ._should_create_license :
1391+ return
13891392 if self ._license == 'OTHER' :
13901393 return
13911394 license_file = open (f"{ self ._addon_dir } /LICENSE" , "w" )
Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ class NTPOptions(bpy.types.PropertyGroup):
9696 ],
9797 default = 'OTHER'
9898 )
99+ should_create_license : bpy .props .BoolProperty (
100+ name = "Create License" ,
101+ description = "Should NodeToPython include a license file" ,
102+ default = True
103+ )
99104 category : bpy .props .EnumProperty (
100105 name = "Category" ,
101106 items = [
@@ -178,6 +183,7 @@ def draw(self, context):
178183 "location" ,
179184 "menu_id" ,
180185 "license" ,
186+ "should_create_license" ,
181187 "category"
182188 ]
183189 option_list += addon_options
You can’t perform that action at this time.
0 commit comments