Merge branch '116-bfon-is-missing' into 'develop'
Resolve "Bfont is missing" See merge request slumber/multi-user!46
This commit is contained in:
@@ -35,7 +35,7 @@ class BlFont(BlDatablock):
|
||||
|
||||
def _construct(self, data):
|
||||
if data['filepath'] == '<builtin>':
|
||||
return bpy.data.fonts[data['name']]
|
||||
return bpy.data.fonts.load(data['filepath'])
|
||||
elif 'font_file' in data.keys():
|
||||
prefs = utils.get_preferences()
|
||||
font_name = f"{self.uuid}.ttf"
|
||||
|
||||
+1
-3
@@ -57,13 +57,11 @@ def get_datablock_users(datablock):
|
||||
|
||||
|
||||
def clean_scene():
|
||||
builtin = ['Bfont']
|
||||
for type_name in dir(bpy.data):
|
||||
try:
|
||||
type_collection = getattr(bpy.data, type_name)
|
||||
for item in type_collection:
|
||||
if item.name not in builtin:
|
||||
type_collection.remove(item)
|
||||
type_collection.remove(item)
|
||||
except:
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user