Rename BG image Transparency to Opacity, Since 100% transparency is actually 100...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 6 Nov 2010 21:40:09 +0000 (21:40 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 6 Nov 2010 21:40:09 +0000 (21:40 +0000)
release/scripts/ui/space_view3d.py
source/blender/makesrna/intern/rna_space.c

index 2cc05cb5e2dfe2f673df78702dff1cef52265194..617eb2c770219e160bbda04a186b4682230d25c0 100644 (file)
@@ -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")
index 80a053c3c996dd5e12680181c1cb2cb8f207c0d1..ae3d0813036c20da8a56330bdb264d646b4e3ee9 100644 (file)
@@ -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);