Rigify - saving pbone custom properties to metarig #104695
@ -440,10 +440,12 @@ def write_metarig(obj: ArmatureObject, layers=False, func_name="create",
|
||||
if 'subtype' in props_data:
|
||||
code.append(f" subtype={props_data['subtype']!r},")
|
||||
|
||||
if 'description' in props_data:
|
||||
code.append(f" description={props_data['description']!r}")
|
||||
code.append(f" )")
|
||||
code.append(f" description={props_data['description']!r},")
|
||||
if 'precision' in props_data:
|
||||
code.append(f" pbone.id_properties_ui({custom_property!r}).update(precision={props_data['precision']})")
|
||||
code.append(f" precision={props_data['precision']},")
|
||||
if 'step' in props_data:
|
||||
Alexander Gavrilov
commented
This is still not using repr. Also, step and precision should now be supported directly by This is still not using repr. Also, step and precision should now be supported directly by `rna_idprop_ui_create`, I fixed that recently.
Andrej
commented
Resolved in Resolved in ca78100418069ed45b340504ffcb55a03327627e
|
||||
code.append(f" step={props_data['step']},")
|
||||
Alexander Gavrilov
commented
If current_value is actually equal to default, this would be redundant. If current_value is actually equal to default, this would be redundant.
Andrej
commented
resolved in resolved in 076763507e82ff209f546aba4b2ab03061254d9d
|
||||
code.append(f" )")
|
||||
if props_data['default'] != current_value:
|
||||
code.append(f" pbone[{custom_property!r}] = {current_value}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
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