feat : debug
This commit is contained in:
parent
999b7c9c62
commit
feca5943df
@ -518,7 +518,7 @@ def watchdog_worker(feed,interval, stop_event):
|
|||||||
# item.id = bpy.context.scene.session_settings.username
|
# item.id = bpy.context.scene.session_settings.username
|
||||||
# feed.put(('DUMP',key,None))
|
# feed.put(('DUMP',key,None))
|
||||||
if item.is_dirty:
|
if item.is_dirty:
|
||||||
logger.info("{} needs update".format(item.name))
|
logger.info("{} needs update".format(key))
|
||||||
feed.put(('DUMP',key,None))
|
feed.put(('DUMP',key,None))
|
||||||
item.is_dirty = False
|
item.is_dirty = False
|
||||||
except:
|
except:
|
||||||
|
@ -311,7 +311,7 @@ def load_curve(target=None, data=None, create=False):
|
|||||||
for point_index in data['splines'][spline]["points"]:
|
for point_index in data['splines'][spline]["points"]:
|
||||||
new_spline.points.add(1)
|
new_spline.points.add(1)
|
||||||
dump_anything.load(new_spline.points[point_index], data['splines'][spline]["points"][point_index])
|
dump_anything.load(new_spline.points[point_index], data['splines'][spline]["points"][point_index])
|
||||||
|
target.id = data['id']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("curve loading error: {}".format(e))
|
logger.error("curve loading error: {}".format(e))
|
||||||
|
|
||||||
@ -451,6 +451,12 @@ 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]
|
||||||
|
tpoint.co[1] = p['co'][1]
|
||||||
|
tpoint.co[2] = p['co'][2]
|
||||||
|
print(p['co'])
|
||||||
|
print(tpoint.co)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def load_gpencil(target=None, data=None, create=False):
|
def load_gpencil(target=None, data=None, create=False):
|
||||||
@ -458,6 +464,7 @@ def load_gpencil(target=None, data=None, create=False):
|
|||||||
if target is None and create:
|
if target is None and create:
|
||||||
target = bpy.data.grease_pencils.new(data["name"])
|
target = bpy.data.grease_pencils.new(data["name"])
|
||||||
|
|
||||||
|
|
||||||
if "layers" in data.keys():
|
if "layers" in data.keys():
|
||||||
for layer in data["layers"]:
|
for layer in data["layers"]:
|
||||||
if layer not in target.layers.keys():
|
if layer not in target.layers.keys():
|
||||||
|
@ -324,7 +324,7 @@ class Loader:
|
|||||||
(_load_filter_type(T.PointerProperty), self._load_pointer),
|
(_load_filter_type(T.PointerProperty), self._load_pointer),
|
||||||
(_load_filter_array, self._load_array),
|
(_load_filter_array, self._load_array),
|
||||||
(_load_filter_type(T.CollectionProperty), self._load_collection),
|
(_load_filter_type(T.CollectionProperty), self._load_collection),
|
||||||
# (_load_filter_default, self._load_default)
|
(_load_filter_default, self._load_default)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -339,4 +339,5 @@ def dump(any, depth=1):
|
|||||||
|
|
||||||
def load(dst, src):
|
def load(dst, src):
|
||||||
loader = Loader()
|
loader = Loader()
|
||||||
|
# loader.match_subset_all = loader.match_subset_all
|
||||||
loader.load(dst, src)
|
loader.load(dst, src)
|
@ -536,7 +536,7 @@ def depsgraph_update(scene):
|
|||||||
if update.id.id == username or update.id.id == 'None':
|
if update.id.id == username or update.id.id == 'None':
|
||||||
# TODO: handle errors
|
# TODO: handle errors
|
||||||
data_ref = get_datablock(update,context)
|
data_ref = get_datablock(update,context)
|
||||||
|
|
||||||
if data_ref:
|
if data_ref:
|
||||||
data_ref.is_dirty= True
|
data_ref.is_dirty= True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user