Rename BG image Transparency to Opacity, Since 100% transparency is actually 100% opaque and this matches grease pencil.

This commit is contained in:
Campbell Barton 2010-11-06 21:40:09 +00:00
parent 09980065b7
commit e9fa964315
2 changed files with 10 additions and 3 deletions

@ -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")

@ -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);