Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_camera.c
| Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | static void rna_def_camera_background_image(BlenderRNA *brna) | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "cuser"); | RNA_def_property_pointer_sdna(prop, NULL, "cuser"); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Clip User", "Parameters defining which frame of the movie clip is displayed"); | prop, "Clip User", "Parameters defining which frame of the movie clip is displayed"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_XYZ); | prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_XYZ); | ||||
| RNA_def_property_float_sdna(prop, NULL, "offset"); | RNA_def_property_float_sdna(prop, NULL, "offset"); | ||||
| RNA_def_property_ui_text(prop, "Offset", ""); | RNA_def_property_ui_text(prop, "Offset", ""); | ||||
| RNA_def_property_ui_range(prop, -10.0, 10.0, 0.1, RNA_TRANSLATION_PREC_DEFAULT); | |||||
brecht: I'm not sure why -10..10 limits were added here. If the intent was only to get a better step… | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "scale"); | RNA_def_property_float_sdna(prop, NULL, "scale"); | ||||
| RNA_def_property_ui_text(prop, "Scale", "Scale the background image"); | RNA_def_property_ui_text(prop, "Scale", "Scale the background image"); | ||||
| RNA_def_property_range(prop, 0.0, FLT_MAX); | RNA_def_property_range(prop, 0.0, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.0, 10.0, 0.100, RNA_TRANSLATION_PREC_DEFAULT); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE); | prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "rotation"); | RNA_def_property_float_sdna(prop, NULL, "rotation"); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Rotation", "Rotation for the background image (ortho view only)"); | prop, "Rotation", "Rotation for the background image (ortho view only)"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| ▲ Show 20 Lines • Show All 515 Lines • Show Last 20 Lines | |||||
I'm not sure why -10..10 limits were added here. If the intent was only to get a better step size and precision then I think "-FLT_MAX" and "FLT_MAX" would be better as soft limits.