Delicode / NI-mate-plugins

This repository holds the plugins for NI mate.
http://www.ni-mate.com
17 stars 7 forks source link

Blender plugin 2.8 not resetting #8

Closed johsely closed 3 years ago

johsely commented 4 years ago

The reset option does not work for me. It does not reset anything if I press Stop. I have the checkbox selected.

NI mate 2.14 Blender 2.8

SirDifferential commented 4 years ago

Looks like something that may not have functioned even before the 2.80 migration. I'll take a look at some point. The problem is the originals being properly assigned, but never being used for anything outside the destructor.

CemDK commented 4 years ago

This is still persisting in NI mate 3.0 for me. I have found that the 'sync' var never gets set to true for me. So the set_location_func never gets called with 'original_locations'

I fixed this for my self by adding a variable 'originals_saved' to the NImateReceiver class and then just saving them to 'original_locations' in the NImateReceiver.run() function:

if not self.originals_saved: self.originals_saved = True for ob_name in objects.keys(): self.original_locations[ob_name] = objects[ob_name].location.copy() self.original_rotations[ob_name] = objects[ob_name].rotation_quaternion.copy()