retain object selections after transferring morphs

Issue #360 resolved
Luke Graybill created an issue

It would be handy if the morph transfer tools could restore the initially active object when it is finished operating. I don’t know how many times I’ve used “Transfer JCMs”, then pushed the “Transfer Other Morphs” button without realizing that the main body mesh is no longer active.

(Note that recent commits seem to deselect all meshes, which is slightly different from how it worked for months before - where one of the selected meshes would become the active. Regardless of this newer behavior, my suggestion stands.)

Steps to reproduce

Select geograft, then select body mesh as active object:

Transfer JCMs:

Transfer process completed, but different mesh is now active entire selection is lost:

Comments (9)

  1. Luke Graybill reporter

    Ugh, formatting issue descriptions on Bitbucket is a pain in the ass without a preview feature, but I think I got it readable now 😅

  2. Thomas Larsson repo owner

    Implemented in last commit. In fact, all buttons will have this property. Hope that that does not break something.

  3. Luke Graybill reporter

    The change does in fact retain the active object, that’s great! However, the selected (but not active) objects are still deselected.

    Also, importing a figure when no object is currently selected in the scene produces an exception (although the import seems to complete):

    Python: Traceback (most recent call last):
      File "C:\Users\killa\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Diffeomorphic-import_daz-125ea3225798\error.py", line 255, in execute
        self.sequel(context)
      File "C:\Users\killa\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Diffeomorphic-import_daz-125ea3225798\error.py", line 277, in sequel
        setSelected(self.activeObject, True)
      File "C:\Users\killa\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\Diffeomorphic-import_daz-125ea3225798\utils.py", line 228, in setSelected
        ob.select_set(value)
    AttributeError: 'NoneType' object has no attribute 'select_set'
    
    location: <unknown location>:-1
    

  4. Log in to comment