[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41625] trunk/blender: RNA:
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Nov 7 17:26:53 CET 2011
Revision: 41625
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41625
Author: blendix
Date: 2011-11-07 16:26:53 +0000 (Mon, 07 Nov 2011)
Log Message:
-----------
RNA:
* Expose 3D view camera zoom and offset, needed if you want to precisely
reconstruct camera parameters.
* Rename SpaceFileBrowser.operator to active_operator, to avoid conflict
with c++ keyword.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/space_filebrowser.py
trunk/blender/source/blender/makesrna/intern/rna_space.c
Modified: trunk/blender/release/scripts/startup/bl_ui/space_filebrowser.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_filebrowser.py 2011-11-07 16:26:23 UTC (rev 41624)
+++ trunk/blender/release/scripts/startup/bl_ui/space_filebrowser.py 2011-11-07 16:26:53 UTC (rev 41625)
@@ -62,7 +62,7 @@
row.prop(params, "use_filter_folder", text="")
if params.filter_glob:
- #if st.operator and hasattr(st.operator, "filter_glob"):
+ #if st.active_operator and hasattr(st.active_operator, "filter_glob"):
# row.prop(params, "filter_glob", text="")
row.label(params.filter_glob)
else:
Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c 2011-11-07 16:26:23 UTC (rev 41624)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c 2011-11-07 16:26:53 UTC (rev 41625)
@@ -1668,6 +1668,17 @@
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_ui_text(prop, "Distance", "Distance to the view location");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "view_camera_zoom", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "camzoom");
+ RNA_def_property_ui_text(prop, "Camera Zoom", "Zoom factor in camera view");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
+ prop= RNA_def_property(srna, "view_camera_offset", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "camdx");
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_ui_text(prop, "Camera Offset", "View shift in camera view");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
}
static void rna_def_space_buttons(BlenderRNA *brna)
@@ -2564,9 +2575,9 @@
RNA_def_property_pointer_sdna(prop, NULL, "params");
RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser");
- prop= RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "op");
- RNA_def_property_ui_text(prop, "Operator", "");
+ RNA_def_property_ui_text(prop, "Active Operator", "");
}
static void rna_def_space_info(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list