[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43303] trunk/blender/source/blender: rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name .

Campbell Barton ideasman42 at gmail.com
Wed Jan 11 17:32:17 CET 2012


Revision: 43303
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43303
Author:   campbellbarton
Date:     2012-01-11 16:32:12 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/curve/editcurve.c
    trunk/blender/source/blender/editors/curve/editfont.c
    trunk/blender/source/blender/editors/mesh/editmesh_mods.c
    trunk/blender/source/blender/editors/mesh/mesh_data.c
    trunk/blender/source/blender/editors/object/object_add.c
    trunk/blender/source/blender/editors/object/object_constraint.c
    trunk/blender/source/blender/editors/object/object_modifier.c
    trunk/blender/source/blender/editors/object/object_relations.c
    trunk/blender/source/blender/editors/object/object_transform.c
    trunk/blender/source/blender/editors/render/render_internal.c
    trunk/blender/source/blender/editors/render/render_shading.c
    trunk/blender/source/blender/editors/screen/screen_ops.c
    trunk/blender/source/blender/editors/screen/screendump.c
    trunk/blender/source/blender/editors/sound/sound_ops.c
    trunk/blender/source/blender/editors/space_buttons/buttons_ops.c
    trunk/blender/source/blender/editors/space_clip/clip_ops.c
    trunk/blender/source/blender/editors/space_console/console_ops.c
    trunk/blender/source/blender/editors/space_file/filesel.c
    trunk/blender/source/blender/editors/space_image/image_ops.c
    trunk/blender/source/blender/editors/space_logic/logic_ops.c
    trunk/blender/source/blender/editors/space_node/node_edit.c
    trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
    trunk/blender/source/blender/editors/space_text/text_ops.c
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/editors/transform/transform.c
    trunk/blender/source/blender/editors/transform/transform_generics.c
    trunk/blender/source/blender/editors/transform/transform_ops.c
    trunk/blender/source/blender/editors/transform/transform_snap.c
    trunk/blender/source/blender/editors/util/undo.c
    trunk/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    trunk/blender/source/blender/makesrna/RNA_access.h
    trunk/blender/source/blender/makesrna/intern/rna_access.c
    trunk/blender/source/blender/python/intern/bpy_rna.c
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/editors/curve/editcurve.c
===================================================================
--- trunk/blender/source/blender/editors/curve/editcurve.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/curve/editcurve.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -4636,7 +4636,7 @@
 {
 	RegionView3D *rv3d= CTX_wm_region_view3d(C);
 
-	if(rv3d && !RNA_property_is_set(op->ptr, "location")) {
+	if(rv3d && !RNA_struct_property_is_set(op->ptr, "location")) {
 		Curve *cu;
 		ViewContext vc;
 		float location[3];

Modified: trunk/blender/source/blender/editors/curve/editfont.c
===================================================================
--- trunk/blender/source/blender/editors/curve/editfont.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/curve/editfont.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -398,7 +398,7 @@
 
 static int paste_file_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
-	if(RNA_property_is_set(op->ptr, "filepath"))
+	if(RNA_struct_property_is_set(op->ptr, "filepath"))
 		return paste_file_exec(C, op);
 
 	WM_event_add_fileselect(C, op); 
@@ -1190,7 +1190,7 @@
 	wchar_t *inserted_text;
 	int a, len;
 
-	if(!RNA_property_is_set(op->ptr, "text"))
+	if(!RNA_struct_property_is_set(op->ptr, "text"))
 		return OPERATOR_CANCELLED;
 	
 	inserted_utf8= RNA_string_get_alloc(op->ptr, "text", NULL, 0);
@@ -1223,10 +1223,10 @@
 	int event= evt->type, val= evt->val;
 	wchar_t inserted_text[2]= {0};
 
-	if(RNA_property_is_set(op->ptr, "text"))
+	if(RNA_struct_property_is_set(op->ptr, "text"))
 		return insert_text_exec(C, op);
 
-	if(RNA_property_is_set(op->ptr, "accent")) {
+	if(RNA_struct_property_is_set(op->ptr, "accent")) {
 		if(cu->len!=0 && cu->pos>0)
 			accentcode= 1;
 		return OPERATOR_FINISHED;
@@ -1673,7 +1673,7 @@
 
 	path = (font && strcmp(font->name, FO_BUILTIN_NAME) != 0)? font->name: U.fontdir;
 
-	if(RNA_property_is_set(op->ptr, "filepath"))
+	if(RNA_struct_property_is_set(op->ptr, "filepath"))
 		return font_open_exec(C, op);
 
 	RNA_string_set(op->ptr, "filepath", path);

Modified: trunk/blender/source/blender/editors/mesh/editmesh_mods.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_mods.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/mesh/editmesh_mods.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -2458,7 +2458,7 @@
 
 static void linked_limit_default(bContext *C, wmOperator *op)
 {
-	if(!RNA_property_is_set(op->ptr, "limit")) {
+	if(!RNA_struct_property_is_set(op->ptr, "limit")) {
 		Object *obedit= CTX_data_edit_object(C);
 		EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
 		if(em->selectmode == SCE_SELECT_FACE)

Modified: trunk/blender/source/blender/editors/mesh/mesh_data.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/mesh_data.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/mesh/mesh_data.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -368,7 +368,7 @@
 	}
 	
 	/* check input variables */
-	if(RNA_property_is_set(op->ptr, "filepath")) {
+	if(RNA_struct_property_is_set(op->ptr, "filepath")) {
 		char path[FILE_MAX];
 		
 		RNA_string_get(op->ptr, "filepath", path);

Modified: trunk/blender/source/blender/editors/object/object_add.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_add.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/object/object_add.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -207,17 +207,17 @@
 static void object_add_generic_invoke_options(bContext *C, wmOperator *op)
 {
 	if(RNA_struct_find_property(op->ptr, "enter_editmode")) /* optional */
-		if (!RNA_property_is_set(op->ptr, "enter_editmode"))
+		if (!RNA_struct_property_is_set(op->ptr, "enter_editmode"))
 			RNA_boolean_set(op->ptr, "enter_editmode", U.flag & USER_ADD_EDITMODE);
 	
-	if(!RNA_property_is_set(op->ptr, "location")) {
+	if(!RNA_struct_property_is_set(op->ptr, "location")) {
 		float loc[3];
 		
 		ED_object_location_from_view(C, loc);
 		RNA_float_set_array(op->ptr, "location", loc);
 	}
 	 
-	if(!RNA_property_is_set(op->ptr, "layers")) {
+	if(!RNA_struct_property_is_set(op->ptr, "layers")) {
 		View3D *v3d = CTX_wm_view3d(C);
 		Scene *scene = CTX_data_scene(C);
 		int a, values[20], layer;
@@ -257,7 +257,7 @@
 		*enter_editmode = TRUE;
 	}
 
-	if(RNA_property_is_set(op->ptr, "layers")) {
+	if(RNA_struct_property_is_set(op->ptr, "layers")) {
 		RNA_boolean_get_array(op->ptr, "layers", layer_values);
 		*layer= 0;
 		for(a=0; a<20; a++) {
@@ -278,9 +278,9 @@
 	if(v3d && v3d->localvd)
 		*layer |= v3d->lay;
 
-	if(RNA_property_is_set(op->ptr, "rotation"))
+	if(RNA_struct_property_is_set(op->ptr, "rotation"))
 		view_align = FALSE;
-	else if (RNA_property_is_set(op->ptr, "view_align"))
+	else if (RNA_struct_property_is_set(op->ptr, "view_align"))
 		view_align = RNA_boolean_get(op->ptr, "view_align");
 	else {
 		view_align = U.flag & USER_ADD_VIEWALIGNED;

Modified: trunk/blender/source/blender/editors/object/object_constraint.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_constraint.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/object/object_constraint.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -553,7 +553,7 @@
 	bConstraint *con;
 	ListBase *list;
 	
-	if (RNA_property_is_set(op->ptr, "constraint") && RNA_property_is_set(op->ptr, "owner"))
+	if (RNA_struct_property_is_set(op->ptr, "constraint") && RNA_struct_property_is_set(op->ptr, "owner"))
 		return 1;
 	
 	if (ptr.data) {

Modified: trunk/blender/source/blender/editors/object/object_modifier.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_modifier.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/object/object_modifier.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -736,7 +736,7 @@
 	PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
 	ModifierData *md;
 	
-	if (RNA_property_is_set(op->ptr, "modifier"))
+	if (RNA_struct_property_is_set(op->ptr, "modifier"))
 		return 1;
 	
 	if (ptr.data) {
@@ -1209,7 +1209,7 @@
 	if(CustomData_external_test(&me->fdata, CD_MDISPS))
 		return OPERATOR_CANCELLED;
 
-	if(RNA_property_is_set(op->ptr, "filepath"))
+	if(RNA_struct_property_is_set(op->ptr, "filepath"))
 		return multires_external_save_exec(C, op);
 	
 	op->customdata= me;

Modified: trunk/blender/source/blender/editors/object/object_relations.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_relations.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/object/object_relations.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -1056,7 +1056,7 @@
 	int values[20], a;
 	unsigned int lay= 0;
 
-	if(!RNA_property_is_set(op->ptr, "layers")) {
+	if(!RNA_struct_property_is_set(op->ptr, "layers")) {
 		/* note: layers are set in bases, library objects work for this */
 		CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
 			lay |= base->lay;

Modified: trunk/blender/source/blender/editors/object/object_transform.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_transform.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/object/object_transform.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -645,7 +645,7 @@
 		/* get the view settings if 'around' isnt set and the view is available */
 		View3D *v3d= CTX_wm_view3d(C);
 		copy_v3_v3(cursor, give_cursor(scene, v3d));
-		if(v3d && !RNA_property_is_set(op->ptr, "center"))
+		if(v3d && !RNA_struct_property_is_set(op->ptr, "center"))
 			around= v3d->around;
 	}
 

Modified: trunk/blender/source/blender/editors/render/render_internal.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_internal.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/render/render_internal.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -160,7 +160,7 @@
 static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **scene, SceneRenderLayer **srl)
 {
 	/* single layer re-render */
-	if(RNA_property_is_set(op->ptr, "scene")) {
+	if(RNA_struct_property_is_set(op->ptr, "scene")) {
 		Scene *scn;
 		char scene_name[MAX_ID_NAME-2];
 
@@ -176,7 +176,7 @@
 		}
 	}
 
-	if(RNA_property_is_set(op->ptr, "layer")) {
+	if(RNA_struct_property_is_set(op->ptr, "layer")) {
 		SceneRenderLayer *rl;
 		char rl_name[RE_MAXNAME];
 
@@ -537,7 +537,7 @@
 	/* custom scene and single layer re-render */
 	screen_render_scene_layer_set(op, mainp, &scene, &srl);
 
-	if(RNA_property_is_set(op->ptr, "layer"))
+	if(RNA_struct_property_is_set(op->ptr, "layer"))
 		jobflag |= WM_JOB_SUSPEND;
 
 	/* job custom data */

Modified: trunk/blender/source/blender/editors/render/render_shading.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_shading.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/render/render_shading.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -705,7 +705,7 @@
 {
 	//Scene *scene= CTX_data_scene(C);
 	
-	if(RNA_property_is_set(op->ptr, "filepath"))
+	if(RNA_struct_property_is_set(op->ptr, "filepath"))
 		return envmap_save_exec(C, op);
 
 	//RNA_enum_set(op->ptr, "file_type", scene->r.im_format.imtype);

Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c	2012-01-11 16:21:17 UTC (rev 43302)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c	2012-01-11 16:32:12 UTC (rev 43303)
@@ -1348,12 +1348,12 @@
 		int x, y;
 		
 		/* retrieve initial mouse coord, so we can find the active edge */
-		if(RNA_property_is_set(op->ptr, "mouse_x"))
+		if(RNA_struct_property_is_set(op->ptr, "mouse_x"))
 			x= RNA_int_get(op->ptr, "mouse_x");
 		else
 			x= event->x;
 		
-		if(RNA_property_is_set(op->ptr, "mouse_y"))
+		if(RNA_struct_property_is_set(op->ptr, "mouse_y"))

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list