Python: Enable MASS unit in FloatProperty

MASS unit was already implemented for the C api. Only making sure it is
accessible in the python api. Also added 'CAMERA' to the documentation as a valid option.
This commit is contained in:
Monique Dewanchand
2018-08-31 15:00:38 +02:00
parent df62deb0a7
commit d9b9a46aa3
2 changed files with 2 additions and 1 deletions

View File

@@ -121,6 +121,7 @@ const EnumPropertyItem rna_enum_property_unit_items[] = {
{PROP_UNIT_TIME, "TIME", 0, "Time", ""},
{PROP_UNIT_VELOCITY, "VELOCITY", 0, "Velocity", ""},
{PROP_UNIT_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
{PROP_UNIT_MASS, "MASS", 0, "Mass", ""},
{PROP_UNIT_CAMERA, "CAMERA", 0, "Camera", ""},
{0, NULL, 0, NULL, NULL}
};

View File

@@ -1904,7 +1904,7 @@ static void bpy_prop_callback_assign_enum(struct PropertyRNA *prop, PyObject *ge
" :type description: string\n" \
#define BPY_PROPDEF_UNIT_DOC \
" :arg unit: Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION'].\n" \
" :arg unit: Enumerator in ['NONE', 'LENGTH', 'AREA', 'VOLUME', 'ROTATION', 'TIME', 'VELOCITY', 'ACCELERATION', 'MASS', 'CAMERA'].\n" \
" :type unit: string\n" \
#define BPY_PROPDEF_NUM_MIN_DOC \