fix: crash on object dumping
This commit is contained in:
@ -270,7 +270,7 @@ def load_object(target=None, data=None, create=False):
|
|||||||
target = bpy.data.objects.new(data["name"], pointer)
|
target = bpy.data.objects.new(data["name"], pointer)
|
||||||
|
|
||||||
# Load other meshes metadata
|
# Load other meshes metadata
|
||||||
dump_anything.load(target, data)
|
# dump_anything.load(target, data)
|
||||||
|
|
||||||
target.matrix_world = mathutils.Matrix(data["matrix_world"])
|
target.matrix_world = mathutils.Matrix(data["matrix_world"])
|
||||||
|
|
||||||
@ -452,11 +452,8 @@ def load_gpencil_layer(target=None, data=None, create=False):
|
|||||||
tpoint = tstroke.points.add(1)
|
tpoint = tstroke.points.add(1)
|
||||||
tpoint = tstroke.points[len(tstroke.points)-1]
|
tpoint = tstroke.points[len(tstroke.points)-1]
|
||||||
dump_anything.load(tpoint, p)
|
dump_anything.load(tpoint, p)
|
||||||
# tpoint.co[0] = p['co'][0]
|
print(p['co'])
|
||||||
# tpoint.co[1] = p['co'][1]
|
print(tpoint.co)
|
||||||
# tpoint.co[2] = p['co'][2]
|
|
||||||
# print(p['co'])
|
|
||||||
# print(tpoint.co)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -560,11 +560,11 @@ def depsgraph_update(scene):
|
|||||||
if update.id.id == username or update.id.id == 'Common' or update.id.id == 'None':
|
if update.id.id == username or update.id.id == 'Common' or update.id.id == 'None':
|
||||||
# TODO: handle errors
|
# TODO: handle errors
|
||||||
data_ref = get_datablock(update,context)
|
data_ref = get_datablock(update,context)
|
||||||
|
logger.info(update.id.name)
|
||||||
if data_ref:
|
if data_ref:
|
||||||
data_ref.is_dirty= True
|
data_ref.is_dirty= True
|
||||||
elif update.id.id != username:
|
# elif update.id.id != username:
|
||||||
history.put("undo")
|
# history.put("undo")
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
Reference in New Issue
Block a user