[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32898] trunk/blender: Rename BG image Transparency to Opacity, Since 100% transparency is actually 100% opaque and this matches grease pencil .

Campbell Barton ideasman42 at gmail.com
Sat Nov 6 22:40:10 CET 2010


Revision: 32898
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32898
Author:   campbellbarton
Date:     2010-11-06 22:40:09 +0100 (Sat, 06 Nov 2010)

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

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_view3d.py
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/scripts/ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d.py	2010-11-06 21:37:11 UTC (rev 32897)
+++ trunk/blender/release/scripts/ui/space_view3d.py	2010-11-06 21:40:09 UTC (rev 32898)
@@ -2165,8 +2165,9 @@
                 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")

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c	2010-11-06 21:37:11 UTC (rev 32897)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c	2010-11-06 21:40:09 UTC (rev 32898)
@@ -928,6 +928,12 @@
 	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 @@
 	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);
 





More information about the Bf-blender-cvs mailing list