Rigify - saving pbone custom properties to metarig #104695

Merged
Alexander Gavrilov merged 6 commits from Andrej730/blender-addons:rigify_custom_props into main 2023-09-25 21:52:59 +02:00
Showing only changes of commit 497685b06d - Show all commits

View File

@ -437,6 +437,8 @@ def write_metarig(obj: ArmatureObject, layers=False, func_name="create",
code.append(f" soft_min={props_data['soft_min']}, ")
if 'soft_max' in props_data:
code.append(f" soft_max={props_data['soft_max']}, ")
if 'subtype' in props_data:
code.append(f" subtype={props_data['subtype']!r}, ")

Rather than doing '{foo}', use {repr(foo)}. Manual quoting could be barely tolerated for property names, but for the description it is simply unacceptable.

Rather than doing `'{foo}'`, use `{repr(foo)}`. Manual quoting could be barely tolerated for property names, but for the description it is simply unacceptable.

that's really neat thing about repr, didn't know it can be used that way!
resolved in e2b63e1a4b

that's really neat thing about `repr`, didn't know it can be used that way! resolved in e2b63e1a4b07ffa8ca59eef5b4b2be17189f49ff
if 'description' in props_data:
code.append(f" description={props_data['description']!r}")
code.append(f" )")