diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 2cc05cb5e2d..617eb2c7702 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -2165,8 +2165,9 @@ class VIEW3D_PT_background_image(bpy.types.Panel): if (bg.image): box.template_image(bg, "image", bg.image_user, compact=True) - box.prop(bg, "transparency", slider=True) + box.prop(bg, "opacity", slider=True) if bg.view_axis != 'CAMERA': + box.prop(bg, "object") box.prop(bg, "size") row = box.row(align=True) row.prop(bg, "offset_x", text="X") diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 80a053c3c99..ae3d0813036 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -928,6 +928,12 @@ static void rna_def_background_image(BlenderRNA *brna) RNA_def_struct_sdna(srna, "BGpic"); RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background"); + prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "ob"); + RNA_def_property_ui_text(prop, "Object", "Object for placement of the image in the scene"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); + prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ima"); RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space"); @@ -956,9 +962,9 @@ static void rna_def_background_image(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); - prop= RNA_def_property(srna, "transparency", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "blend"); - RNA_def_property_ui_text(prop, "Transparency", "Amount to blend the image against the background color"); + RNA_def_property_ui_text(prop, "Opacity", "Image opacity to blend the image against the background color"); RNA_def_property_range(prop, 0.0, 1.0); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);