BlenderTools icon indicating copy to clipboard operation
BlenderTools copied to clipboard

UE to Rigify - Metarig's `rigify_finalize_script` is ignored

Open dannymcgee opened this issue 1 year ago • 1 comments

  • Addon: UE to Rigify
  • Steps to Reproduce the Problem:
  1. Open the "Scripting" workspace and create a test Python script that does something observable, like print to the System Console
  2. Create a new armature with a single bone (just need a dummy "Source" rig)
  3. Create a new UE to Rigify template from the new armature (may also be reproducible with an existing template — haven't tested that)
  4. Set the "Mode" selector to "Edit Metarig"
  5. In the "Object Data Properties" (armature) tab, expand the "Rigify" section. In the "Run Script" field, select the test script created in step 1.
  6. In the "UE to Rigify Toolkit" N-panel, press "Save Metarig"
  7. Switch to "Control" mode
  8. Observe that the test script assigned to the "Run Script" field was not executed
  9. Switch to "Edit Metarig" mode
  10. Expend the "Rigify" section of the "Object Data Properties" tab. Observe that the "Run Script" field is empty.
  • Error Log: N/A
  • OS: Windows 11
  • Addon Version: UE to Rigify 1.6.2
  • Blender Version: Blender 3.6.4
  • Unreal Version: N/A

I have kind of a difficult source rig that I'm trying to shoehorn a Rigify control rig onto. UE to Rigify gets me 90% of the way there, but there are a handful of operations I need to do after the Rigify rig is generated to get it working the way I want. I was hoping I'd be able to attach a custom script to the metarig's "Run Script" field (the Python property is called rigify_finalize_script), but it seems that UE to Rigify is ignoring that field.

I can still make it work by manually executing the script after switching to Control mode, but that's not really an ideal workflow. (For example, if I forget to do it before I start posing the control rig, I may need to backtrack and lose some work in the process.)

I recognize that supporting custom finalization scripts in custom templates is potentially problematic, because it's adding a dependency to some data that's local to the file where the template was created — I'm not really a Blender expert and I'm not familiar with the implementation details of this addon, so I'm not sure if there's a good solution to that.

dannymcgee avatar Dec 02 '23 19:12 dannymcgee

@dannymcgee

any news on this?

lucioerlan avatar Dec 11 '23 20:12 lucioerlan