Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-13 05:39:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-13 05:39:57 +0400
commit705f23064e8ba3e96690d163c98687fc79d4a179 (patch)
tree13251a1f24cfb219a62c4f64c6750cadec7ff712 /source/blender/editors
parent9e59fed5d8ff9f63477b3a73d2b02eaa55abd6cd (diff)
parentdbdd1c2ea7496546f4f7e17350720a6005cdb187 (diff)
svn merge ^/trunk/blender -r43294:43338
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/curve/editcurve.c4
-rw-r--r--source/blender/editors/curve/editfont.c10
-rw-r--r--source/blender/editors/include/ED_image.h3
-rw-r--r--source/blender/editors/interface/interface.c8
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
-rw-r--r--source/blender/editors/interface/interface_layout.c22
-rw-r--r--source/blender/editors/interface/interface_regions.c4
-rw-r--r--source/blender/editors/interface/interface_templates.c4
-rw-r--r--source/blender/editors/interface/interface_widgets.c16
-rw-r--r--source/blender/editors/mesh/bmesh_tools.c2
-rw-r--r--source/blender/editors/mesh/mesh_data.c2
-rw-r--r--source/blender/editors/object/object_add.c29
-rw-r--r--source/blender/editors/object/object_constraint.c2
-rw-r--r--source/blender/editors/object/object_edit.c3
-rw-r--r--source/blender/editors/object/object_modifier.c4
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_transform.c2
-rw-r--r--source/blender/editors/physics/physics_fluid.c8
-rw-r--r--source/blender/editors/render/render_internal.c6
-rw-r--r--source/blender/editors/render/render_opengl.c14
-rw-r--r--source/blender/editors/render/render_preview.c2
-rw-r--r--source/blender/editors/render/render_shading.c2
-rw-r--r--source/blender/editors/screen/screen_edit.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c6
-rw-r--r--source/blender/editors/screen/screendump.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c7
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c16
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c10
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c10
-rw-r--r--source/blender/editors/sound/sound_ops.c8
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c4
-rw-r--r--source/blender/editors/space_clip/clip_ops.c4
-rw-r--r--source/blender/editors/space_console/console_ops.c2
-rw-r--r--source/blender/editors/space_file/filesel.c8
-rw-r--r--source/blender/editors/space_image/image_draw.c19
-rw-r--r--source/blender/editors/space_image/image_intern.h1
-rw-r--r--source/blender/editors/space_image/image_ops.c18
-rw-r--r--source/blender/editors/space_image/space_image.c9
-rw-r--r--source/blender/editors/space_logic/logic_ops.c6
-rw-r--r--source/blender/editors/space_node/drawnode.c205
-rw-r--r--source/blender/editors/space_node/node_edit.c41
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c12
-rw-r--r--source/blender/editors/space_text/text_ops.c10
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c2
-rw-r--r--source/blender/editors/transform/transform.c14
-rw-r--r--source/blender/editors/transform/transform_generics.c14
-rw-r--r--source/blender/editors/transform/transform_ops.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c6
-rw-r--r--source/blender/editors/util/undo.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c2
56 files changed, 230 insertions, 392 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 22568cd676e..2f5272e37b0 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -4607,8 +4607,6 @@ static int addvert_Nurb(bContext *C, short mode, float location[3])
}
}
- // XXX retopo_do_all();
-
if(ok) {
test2DNurb(nu);
@@ -4636,7 +4634,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
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];
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index cd12cc78ad5..e629a09ca70 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -398,7 +398,7 @@ static int paste_file_exec(bContext *C, wmOperator *op)
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 @@ static int insert_text_exec(bContext *C, wmOperator *op)
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 @@ static int insert_text_invoke(bContext *C, wmOperator *op, wmEvent *evt)
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 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
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);
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h
index 27c61e98e21..957b58b141c 100644
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@ -66,5 +66,8 @@ int ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit)
/* UI level image (texture) updating... render calls own stuff (too) */
void ED_image_update_frame(const struct Main *mainp, int cfra);
+void ED_image_draw_info(struct ARegion *ar, int color_manage, int channels,
+ int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf);
+
#endif /* ED_IMAGE_H */
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 239dae7d236..7ff69277843 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -831,7 +831,9 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
if(but->optype) {
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
- if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) {
+ if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
+ buf, sizeof(buf)))
+ {
UI_MENU_KEY_STR_CAT
}
}
@@ -846,7 +848,9 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
IDP_AssignString(prop_menu_name, mt->idname, sizeof(mt->idname));
- if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE, buf, sizeof(buf))) {
+ if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE,
+ buf, sizeof(buf)))
+ {
UI_MENU_KEY_STR_CAT
}
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 525b15ac7e3..3a19bb2a90c 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4388,7 +4388,9 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event))
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
/* complex code to change name of button */
- if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) {
+ if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
+ buf, sizeof(buf)))
+ {
char *butstr_orig;
// XXX but->str changed... should not, remove the hotkey from it
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 5e42b06e1a7..a01efa25d19 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2742,6 +2742,11 @@ const char *uiLayoutIntrospect(uiLayout *layout)
return str;
}
+static void ui_layout_operator_buts__reset_cb(bContext *UNUSED(C), void *op_pt, void *UNUSED(arg_dummy2))
+{
+ WM_operator_properties_reset((wmOperator *)op_pt);
+}
+
/* this function does not initialize the layout, functions can be called on the layout before and after */
void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag)
{
@@ -2803,7 +2808,22 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
uiItemL(layout, IFACE_("No Properties"), ICON_NONE);
}
}
-
+
+ /* its possible that reset can do nothing if all have PROP_SKIP_SAVE enabled
+ * but this is not so important if this button is drawn in those cases
+ * (which isn't all that likely anyway) - campbell */
+ if (op->properties->len) {
+ uiBlock *block;
+ uiBut *but;
+ uiLayout *col; /* needed to avoid alignment errors with previous buttons */
+
+ col= uiLayoutColumn(layout, 0);
+ block= uiLayoutGetBlock(col);
+ but = uiDefIconTextBut(block , BUT, 0, ICON_FILE_REFRESH, "Reset", 0, 0, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0,
+ "Reset operator defaults");
+ uiButSetFunc(but, ui_layout_operator_buts__reset_cb, op, NULL);
+ }
+
/* set various special settings for buttons */
{
uiBut *but;
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 973b43fca78..0c5aed83c1b 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -409,7 +409,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* operator keymap (not menus, they already have it) */
prop= (but->opptr)? but->opptr->data: NULL;
- if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) {
+ if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
+ buf, sizeof(buf)))
+ {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Shortcut: %s"), buf);
data->color[data->totline]= 0x888888;
data->totline++;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 44224c808cc..9cf93980c2c 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -181,7 +181,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, w, h, NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, w, 19, template.prv_rows, template.prv_cols, "");
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, w, 19, template.prv_rows, template.prv_cols, "");
uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
}
/* list view */
@@ -189,7 +189,7 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, 150, 19, 0, 0, "");
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
uiButSetSearchFunc(but, id_search_cb, &template, id_search_call_cb, idptr.data);
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 5618d37712a..bf2f66e95f8 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -165,14 +165,14 @@ static unsigned int check_tria_face[4][3]= {
GLubyte checker_stipple_sml[32*32/8] =
{
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
- 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
- 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
+ 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
+ 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
+ 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
+ 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
+ 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
+ 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,
+ 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
+ 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,
};
/* ************************************************* */
diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c
index c200a12dad5..baee3fcb23d 100644
--- a/source/blender/editors/mesh/bmesh_tools.c
+++ b/source/blender/editors/mesh/bmesh_tools.c
@@ -4827,7 +4827,7 @@ static int export_obj_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
BLI_strncpy(filename, "//untitled.obj", FILE_MAX);
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return mesh_export_obj_exec(C, op);
export_obj_filesel(C, op, filename);
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 8ba4bb15849..74e3e189f40 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -533,7 +533,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
/* 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);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index a2d73ac8b5d..48b1630025c 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -189,35 +189,40 @@ void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
PropertyRNA *prop;
/* note: this property gets hidden for add-camera operator */
- prop= RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
+ prop = RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
RNA_def_property_update_runtime(prop, view_align_update);
if(do_editmode) {
- prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object");
- RNA_def_property_flag(prop, PROP_HIDDEN);
+ prop = RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode",
+ "Enter editmode when adding this object");
+ RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
}
- RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location for the newly added object", -FLT_MAX, FLT_MAX);
- RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation", "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f);
+ prop = RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location",
+ "Location for the newly added object", -FLT_MAX, FLT_MAX);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_float_rotation(ot->srna, "rotation", 3, NULL, -FLT_MAX, FLT_MAX, "Rotation",
+ "Rotation for the newly added object", (float)-M_PI * 2.0f, (float)M_PI * 2.0f);
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean_layer_member(ot->srna, "layers", 20, NULL, "Layer", "");
- RNA_def_property_flag(prop, PROP_HIDDEN);
+ RNA_def_property_flag(prop, PROP_HIDDEN|PROP_SKIP_SAVE);
}
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 +262,7 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
*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 +283,9 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
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;
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index ac73f03c2d7..a90edb29c29 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -553,7 +553,7 @@ static int edit_constraint_invoke_properties(bContext *C, wmOperator *op)
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) {
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index ea39e857643..5f313301e2e 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -322,9 +322,6 @@ void ED_object_exit_editmode(bContext *C, int flag)
// if(EM_texFaceCheck())
-// if(retopo_mesh_paint_check())
-// retopo_end_okee();
-
if(me->edit_btmesh->bm->totvert>MESH_MAX_VERTS) {
error("Too many vertices");
return;
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 1e7cd9f7624..37ce9c268a4 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -748,7 +748,7 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op)
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) {
@@ -1281,7 +1281,7 @@ static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *U
if(CustomData_external_test(&me->ldata, 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;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 56fd1b4409a..3aa604d48c0 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1054,7 +1054,7 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
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;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 24061defa7c..68c017adecd 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -646,7 +646,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
/* 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;
}
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 0bb5dbef0ea..d652d2c0e5c 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -884,7 +884,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
if(getenv(strEnvName)) {
int dlevel = atoi(getenv(strEnvName));
elbeemSetDebugLevel(dlevel);
- BLI_snprintf(debugStrBuffer,256,"fluidsimBake::msg: Debug messages activated due to envvar '%s'\n",strEnvName);
+ BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"fluidsimBake::msg: Debug messages activated due to envvar '%s'\n",strEnvName);
elbeemDebugOut(debugStrBuffer);
}
@@ -921,7 +921,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* rough check of settings... */
if(domainSettings->previewresxyz > domainSettings->resolutionxyz) {
- BLI_snprintf(debugStrBuffer,256,"fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz , domainSettings->resolutionxyz);
+ BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::warning - Preview (%d) >= Resolution (%d)... setting equal.\n", domainSettings->previewresxyz , domainSettings->resolutionxyz);
elbeemDebugOut(debugStrBuffer);
domainSettings->previewresxyz = domainSettings->resolutionxyz;
}
@@ -941,7 +941,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
} else {
gridlevels = domainSettings->maxRefine;
}
- BLI_snprintf(debugStrBuffer,256,"fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name , gridlevels );
+ BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::msg: Baking %s, refine: %d\n", fsDomain->id.name , gridlevels );
elbeemDebugOut(debugStrBuffer);
@@ -993,7 +993,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
/* ******** init domain object's matrix ******** */
copy_m4_m4(domainMat, fsDomain->obmat);
if(!invert_m4_m4(invDomMat, domainMat)) {
- BLI_snprintf(debugStrBuffer,256,"fluidsimBake::error - Invalid obj matrix?\n");
+ BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"fluidsimBake::error - Invalid obj matrix?\n");
elbeemDebugOut(debugStrBuffer);
BKE_report(reports, RPT_ERROR, "Invalid object matrix");
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index e4597d6afc3..e35df217761 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -160,7 +160,7 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
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 @@ static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **s
}
}
- 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 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* 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 */
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 361b01fe6e0..66f0e429b76 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -40,6 +40,7 @@
#include "BLI_editVert.h"
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
+#include "BLI_jitter.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
@@ -150,28 +151,31 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
}
else {
/* simple accumulation, less hassle then FSAA FBO's */
-# define SAMPLES 5 /* fixed, easy to have more but for now this is ok */
- const float jit_ofs[SAMPLES][2] = {{0, 0}, {0.5f, 0.5f}, {-0.5f,-0.5f}, {-0.5f, 0.5f}, {0.5f, -0.5f}};
+ static float jit_ofs[32][2];
float winmat_jitter[4][4];
float *accum_buffer= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum1");
float *accum_tmp= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2");
int j;
+ BLI_initjit(jit_ofs[0], scene->r.osa);
+
/* first sample buffer, also initializes 'rv3d->persmat' */
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat);
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_buffer);
/* skip the first sample */
- for(j=1; j < SAMPLES; j++) {
+ for(j=1; j < scene->r.osa; j++) {
copy_m4_m4(winmat_jitter, winmat);
- window_translate_m4(winmat_jitter, rv3d->persmat, jit_ofs[j][0] / sizex, jit_ofs[j][1] / sizey);
+ window_translate_m4(winmat_jitter, rv3d->persmat,
+ (jit_ofs[j][0] * 2.0f) / sizex,
+ (jit_ofs[j][1] * 2.0f) / sizey);
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat_jitter);
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_tmp);
add_vn_vn(accum_buffer, accum_tmp, sizex*sizey*sizeof(float));
}
- mul_vn_vn_fl(rr->rectf, accum_buffer, sizex*sizey*sizeof(float), 1.0/SAMPLES);
+ mul_vn_vn_fl(rr->rectf, accum_buffer, sizex*sizey*sizeof(float), 1.0f / scene->r.osa);
MEM_freeN(accum_buffer);
MEM_freeN(accum_tmp);
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 86328ca2a64..3e34a55a3d9 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -104,7 +104,7 @@ ImBuf* get_brush_icon(Brush *brush)
{
static const int flags = IB_rect|IB_multilayer|IB_metadata;
- char path[240];
+ char path[FILE_MAX];
char *folder;
if (!(brush->icon_imbuf)) {
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index a9025b8cdfc..01d3811cce8 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -705,7 +705,7 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event
{
//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);
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 3a0202ad546..25b8b8415d9 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1689,8 +1689,6 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa)
/* XXX bad code: setscreen() ends with first area active. fullscreen render assumes this too */
CTX_wm_area_set(C, sc->areabase.first);
- /* XXX retopo_force_update(); */
-
return sc->areabase.first;
}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b2192b9dabb..eaca87f2d6f 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1346,12 +1346,12 @@ static int area_split_invoke(bContext *C, wmOperator *op, wmEvent *event)
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"))
y= RNA_int_get(op->ptr, "mouse_y");
else
y= event->x;
@@ -3060,7 +3060,7 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op)
int mode= (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1;
int sync= -1;
- if (RNA_property_is_set(op->ptr, "sync"))
+ if (RNA_struct_property_is_set(op->ptr, "sync"))
sync= (RNA_boolean_get(op->ptr, "sync"));
return ED_screen_animation_play(C, sync, mode);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index fe2dc1fb913..043def31a23 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -198,7 +198,7 @@ static int screenshot_exec(bContext *C, wmOperator *op)
static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
if(screenshot_data_create(C, op)) {
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return screenshot_exec(C, op);
RNA_string_set(op->ptr, "filepath", G.ima);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 59181aba6e4..50583c2bbfb 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -4862,7 +4862,7 @@ static int texture_paint_init(bContext *C, wmOperator *op)
image_undo_restore, image_undo_free);
/* create painter */
- pop->painter= brush_painter_new(pop->s.brush);
+ pop->painter= brush_painter_new(scene, pop->s.brush);
return 1;
}
@@ -4968,6 +4968,7 @@ static int paint_exec(bContext *C, wmOperator *op)
static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
{
+ const Scene *scene = CTX_data_scene(C);
PaintOperation *pop= op->customdata;
wmTabletData *wmtab;
PointerRNA itemptr;
@@ -4999,13 +5000,13 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
/* special exception here for too high pressure values on first touch in
windows for some tablets, then we just skip first touch .. */
- if (tablet && (pressure >= 0.99f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(pop->s.brush) || brush_use_size_pressure(pop->s.brush)))
+ if (tablet && (pressure >= 0.99f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(scene, pop->s.brush) || brush_use_size_pressure(scene, pop->s.brush)))
return;
/* This can be removed once fixed properly in
brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, float pressure, void *user)
at zero pressure we should do nothing 1/2^12 is .0002 which is the sensitivity of the most sensitive pen tablet available*/
- if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(pop->s.brush) || brush_use_size_pressure(pop->s.brush)))
+ if (tablet && (pressure < .0002f) && ((pop->s.brush->flag & BRUSH_SPACING_PRESSURE) || brush_use_alpha_pressure(scene, pop->s.brush) || brush_use_size_pressure(scene, pop->s.brush)))
return;
}
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 7cff37e8814..ca5abc16ec8 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -453,7 +453,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
glTranslatef(-0.5f, -0.5f, 0);
/* scale based on tablet pressure */
- if(sd->draw_pressure && brush_use_size_pressure(brush)) {
+ if(sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) {
glTranslatef(0.5f, 0.5f, 0);
glScalef(1.0f/sd->pressure_value, 1.0f/sd->pressure_value, 1);
glTranslatef(-0.5f, -0.5f, 0);
@@ -515,7 +515,7 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
/* TODO: check whether this should really only be done when
brush is over mesh? */
- if(sd->draw_pressure && brush_use_alpha_pressure(brush))
+ if(sd->draw_pressure && brush_use_alpha_pressure(vc->scene, brush))
(*visual_strength) *= sd->pressure_value;
if(sd->draw_anchored)
@@ -529,16 +529,17 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc,
unprojected_radius = paint_calc_object_space_radius(vc, location,
projected_radius);
- if(sd->draw_pressure && brush_use_size_pressure(brush))
+ if(sd->draw_pressure && brush_use_size_pressure(vc->scene, brush))
unprojected_radius *= sd->pressure_value;
- if(!brush_use_locked_size(brush))
+ if(!brush_use_locked_size(vc->scene, brush))
brush_set_unprojected_radius(brush, unprojected_radius);
}
static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
{
- Paint *paint = paint_get_active(CTX_data_scene(C));
+ Scene *scene = CTX_data_scene(C);
+ Paint *paint = paint_get_active(scene);
Brush *brush = paint_brush(paint);
ViewContext vc;
float final_radius;
@@ -597,7 +598,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* draw overlay */
paint_draw_alpha_overlay(sd, brush, &vc, x, y);
- if(brush_use_locked_size(brush))
+ if(brush_use_locked_size(scene, brush))
brush_set_size(brush, pixel_radius);
/* check if brush is subtracting, use different color then */
@@ -764,12 +765,13 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const
length = len_v2(vec);
if(length > FLT_EPSILON) {
+ const Scene *scene = CTX_data_scene(C);
int steps;
int i;
float pressure= 1.0f;
/* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */
- if(brush_use_size_pressure(stroke->brush))
+ if(brush_use_size_pressure(scene, stroke->brush))
pressure = event_tablet_data(event, NULL);
if(pressure > FLT_EPSILON) {
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index e827e16f643..a64326d8d98 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2055,6 +2055,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
{
+ const Scene *scene= CTX_data_scene(C);
ToolSettings *ts= CTX_data_tool_settings(C);
VPaint *wp= ts->wpaint;
Brush *brush = paint_brush(&wp->paint);
@@ -2073,8 +2074,8 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
char *defbase_sel;
const float pressure = RNA_float_get(itemptr, "pressure");
- const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(brush) ? pressure : 1.0f);
- const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(brush) ? pressure : 1.0f);
+ const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(scene, brush) ? pressure : 1.0f);
+ const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
/* intentionally dont initialize as NULL, make sure we initialize all members below */
WeightPaintInfo wpi;
@@ -2567,6 +2568,7 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob,
static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr)
{
+ const Scene *scene= CTX_data_scene(C);
ToolSettings *ts= CTX_data_tool_settings(C);
struct VPaintData *vpd = paint_stroke_mode_data(stroke);
VPaint *vp= ts->vpaint;
@@ -2581,8 +2583,8 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float mval[2];
const float pressure = RNA_float_get(itemptr, "pressure");
- const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(brush) ? pressure : 1.0f);
- const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(brush) ? pressure : 1.0f);
+ const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(scene, brush) ? pressure : 1.0f);
+ const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(scene, brush) ? pressure : 1.0f);
RNA_float_get_array(itemptr, "mouse", mval);
flip = RNA_boolean_get(itemptr, "pen_flip");
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 694485f51f2..f323a592b07 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -549,7 +549,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
const float root_alpha = brush_alpha(brush);
float alpha = root_alpha*root_alpha;
float dir = brush->flag & BRUSH_DIR_IN ? -1 : 1;
- float pressure = brush_use_alpha_pressure(brush) ? cache->pressure : 1;
+ float pressure = brush_use_alpha_pressure(cache->vc->scene, brush) ? cache->pressure : 1;
float pen_flip = cache->pen_flip ? -1 : 1;
float invert = cache->invert ? -1 : 1;
float accum = integrate_overlap(brush);
@@ -3017,6 +3017,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
struct PaintStroke *stroke,
PointerRNA *ptr)
{
+ const Scene *scene = CTX_data_scene(C);
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
Brush *brush = paint_brush(&sd->paint);
@@ -3054,7 +3055,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
cache->pixel_radius = brush_size(brush);
if(cache->first_time) {
- if (!brush_use_locked_size(brush)) {
+ if (!brush_use_locked_size(scene, brush)) {
cache->initial_radius= paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(brush));
brush_set_unprojected_radius(brush, cache->initial_radius);
}
@@ -3063,7 +3064,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
}
}
- if(brush_use_size_pressure(brush)) {
+ if(brush_use_size_pressure(scene, brush)) {
cache->pixel_radius *= cache->pressure;
cache->radius= cache->initial_radius * cache->pressure;
}
@@ -3287,7 +3288,8 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
/* Restore the mesh before continuing with anchored stroke */
if((brush->flag & BRUSH_ANCHORED) ||
- (brush->sculpt_tool == SCULPT_TOOL_GRAB && brush_use_size_pressure(brush)) ||
+ (brush->sculpt_tool == SCULPT_TOOL_GRAB &&
+ brush_use_size_pressure(ss->cache->vc->scene, brush)) ||
(brush->flag & BRUSH_RESTORE_MESH))
{
StrokeCache *cache = ss->cache;
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index a82d75e6ce7..50c436d88f5 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -162,7 +162,7 @@ static int sound_open_exec(bContext *UNUSED(C), wmOperator *op)
static int sound_open_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return sound_open_exec(C, op);
sound_open_init(C, op);
@@ -359,7 +359,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return sound_mixdown_exec(C, op);
return WM_operator_filesel(C, op, event);
@@ -653,7 +653,7 @@ static int sound_unpack_exec(bContext *C, wmOperator *op)
bSound* sound= NULL;
/* find the suppplied image by name */
- if (RNA_property_is_set(op->ptr, "id")) {
+ if (RNA_struct_property_is_set(op->ptr, "id")) {
char sndname[MAX_ID_NAME-2];
RNA_string_get(op->ptr, "id", sndname);
sound = BLI_findstring(&CTX_data_main(C)->sound, sndname, offsetof(ID, name) + 2);
@@ -675,7 +675,7 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
Editing* ed = CTX_data_scene(C)->ed;
bSound* sound;
- if(RNA_property_is_set(op->ptr, "id"))
+ if(RNA_struct_property_is_set(op->ptr, "id"))
return sound_unpack_exec(C, op);
if(!ed || !ed->act_seq || ed->act_seq->type != SEQ_SOUND)
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 05fdcd50067..df05521fa8d 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -103,7 +103,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
char *str, path[FILE_MAX];
const char *path_prop= RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
- if (RNA_property_is_set(op->ptr, path_prop)==0 || fbo==NULL)
+ if (RNA_struct_property_is_set(op->ptr, path_prop)==0 || fbo==NULL)
return OPERATOR_CANCELLED;
str= RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
@@ -200,7 +200,7 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* normally ED_fileselect_get_params would handle this but we need to because of stupid
* user-prefs exception - campbell */
if(RNA_struct_find_property(op->ptr, "relative_path")) {
- if(!RNA_property_is_set(op->ptr, "relative_path")) {
+ if(!RNA_struct_property_is_set(op->ptr, "relative_path")) {
/* annoying exception!, if were dealign with the user prefs, default relative to be off */
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS && (ptr.data != &U));
}
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index c7d09c2edfc..45c7043c44c 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -184,10 +184,10 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
if(clip)
path= clip->name;
- if(!RNA_property_is_set(op->ptr, "relative_path"))
+ if(!RNA_struct_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return open_exec(C, op);
open_init(C, op);
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 23316616a57..c91c8e1bd14 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -410,7 +410,7 @@ static int console_insert_exec(bContext *C, wmOperator *op)
static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ // if(!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
if(!RNA_string_length(op->ptr, "text")) {
/* if alt/ctrl/super are pressed pass through */
if(event->ctrl || event->oskey) {
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 1d629ad6dea..bf31775a349 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -130,7 +130,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
else
params->type = FILE_SPECIAL;
- if (is_filepath && RNA_property_is_set(op->ptr, "filepath")) {
+ if (is_filepath && RNA_struct_property_is_set(op->ptr, "filepath")) {
char name[FILE_MAX];
RNA_string_get(op->ptr, "filepath", name);
if (params->type == FILE_LOADLIB) {
@@ -142,12 +142,12 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
}
else {
- if (is_directory && RNA_property_is_set(op->ptr, "directory")) {
+ if (is_directory && RNA_struct_property_is_set(op->ptr, "directory")) {
RNA_string_get(op->ptr, "directory", params->dir);
sfile->params->file[0]= '\0';
}
- if (is_filename && RNA_property_is_set(op->ptr, "filename")) {
+ if (is_filename && RNA_struct_property_is_set(op->ptr, "filename")) {
RNA_string_get(op->ptr, "filename", params->file);
}
}
@@ -226,7 +226,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
}
if (is_relative_path) {
- if (!RNA_property_is_set(op->ptr, "relative_path")) {
+ if (!RNA_struct_property_is_set(op->ptr, "relative_path")) {
RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
}
}
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 21a4f35bcb8..41fc861f8e4 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -110,7 +110,8 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar)
BKE_image_release_renderresult(scene, ima);
}
-void draw_image_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf)
+/* used by node view too */
+void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf)
{
char str[256];
float dx= 6;
@@ -378,14 +379,14 @@ static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysiz
{
GLubyte checker_stipple[32*32/8] =
{
- 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \
- 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \
- 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \
- 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, \
- 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \
- 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \
- 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \
- 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, \
+ 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,
+ 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,
+ 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,
+ 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0,
+ 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,
+ 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,
+ 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,
+ 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255,
};
glColor3ubv(col1);
diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h
index 04156c80c0e..29673f74538 100644
--- a/source/blender/editors/space_image/image_intern.h
+++ b/source/blender/editors/space_image/image_intern.h
@@ -55,7 +55,6 @@ void IMAGE_OT_toolbox(struct wmOperatorType *ot);
/* image_draw.c */
void draw_image_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene);
-void draw_image_info(struct ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4], int *zp, float *zpf);
void draw_image_grease_pencil(struct bContext *C, short onlyv2d);
/* image_ops.c */
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 0efc89e802a..999a25f57b5 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -817,7 +817,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
if(ima)
path= ima->name;
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return image_open_exec(C, op);
image_open_init(C, op);
@@ -876,10 +876,10 @@ static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
if(!sima->image)
return OPERATOR_CANCELLED;
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return image_replace_exec(C, op);
- if(!RNA_property_is_set(op->ptr, "relative_path"))
+ if(!RNA_struct_property_is_set(op->ptr, "relative_path"))
RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0);
image_filesel(C, op, sima->image->name);
@@ -1011,7 +1011,7 @@ static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op
simopts->im_format= *(ImageFormatData *)op->customdata;
}
- if (RNA_property_is_set(op->ptr, "filepath")) {
+ if (RNA_struct_property_is_set(op->ptr, "filepath")) {
RNA_string_get(op->ptr, "filepath", simopts->filepath);
BLI_path_abs(simopts->filepath, G.main->name);
}
@@ -1176,7 +1176,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
Scene *scene= CTX_data_scene(C);
SaveImageOptions simopts;
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return image_save_as_exec(C, op);
if (save_image_options_init(&simopts, sima, scene, TRUE) == 0)
@@ -1184,7 +1184,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
save_image_options_to_op(&simopts, op);
/* enable save_copy by default for render results */
- if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_property_is_set(op->ptr, "copy")) {
+ if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_struct_property_is_set(op->ptr, "copy")) {
RNA_boolean_set(op->ptr, "copy", TRUE);
}
@@ -1676,7 +1676,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op)
int method= RNA_enum_get(op->ptr, "method");
/* find the suppplied image by name */
- if (RNA_property_is_set(op->ptr, "id")) {
+ if (RNA_struct_property_is_set(op->ptr, "id")) {
char imaname[MAX_ID_NAME-2];
RNA_string_get(op->ptr, "id", imaname);
ima = BLI_findstring(&CTX_data_main(C)->image, imaname, offsetof(ID, name) + 2);
@@ -1708,7 +1708,7 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
{
Image *ima= CTX_data_edit_image(C);
- if(RNA_property_is_set(op->ptr, "id"))
+ if(RNA_struct_property_is_set(op->ptr, "id"))
return image_unpack_exec(C, op);
if(!ima || !ima->packedfile)
@@ -1772,7 +1772,7 @@ static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_
ImageSampleInfo *info= arg_info;
if(info->draw) {
/* no color management needed for images (color_manage=0) */
- draw_image_info(ar, 0, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp);
+ ED_image_draw_info(ar, 0, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp);
}
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index acc2bf5349a..c9cb5bd406d 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -593,8 +593,13 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
/* new shading system, get image from material */
BMFace *efa = BM_get_actFace(em->bm, sloppy);
- if(efa)
- ED_object_get_active_image(obedit, efa->mat_nr, &sima->image, NULL, NULL);
+ if(efa) {
+ Image *node_ima;
+ ED_object_get_active_image(obedit, efa->mat_nr, &node_ima, NULL, NULL);
+
+ if(node_ima)
+ sima->image= node_ima;
+ }
}
else {
/* old shading system, we set texface */
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index b0f5e786eef..0dfcafcf549 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -96,7 +96,7 @@ static int edit_sensor_invoke_properties(bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor);
- if (RNA_property_is_set(op->ptr, "sensor") && RNA_property_is_set(op->ptr, "object") )
+ if (RNA_struct_property_is_set(op->ptr, "sensor") && RNA_struct_property_is_set(op->ptr, "object") )
return 1;
if (ptr.data) {
@@ -152,7 +152,7 @@ static int edit_controller_invoke_properties(bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "controller", &RNA_Controller);
- if (RNA_property_is_set(op->ptr, "controller") && RNA_property_is_set(op->ptr, "object") )
+ if (RNA_struct_property_is_set(op->ptr, "controller") && RNA_struct_property_is_set(op->ptr, "object") )
return 1;
if (ptr.data) {
@@ -191,7 +191,7 @@ static int edit_actuator_invoke_properties(bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "actuator", &RNA_Actuator);
- if (RNA_property_is_set(op->ptr, "actuator") && RNA_property_is_set(op->ptr, "object") )
+ if (RNA_struct_property_is_set(op->ptr, "actuator") && RNA_struct_property_is_set(op->ptr, "object") )
return 1;
if (ptr.data) {
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 3f8d9a75244..7d475973c09 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2279,211 +2279,6 @@ void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
}
}
-void draw_nodespace_color_info(ARegion *ar, int color_manage, int channels, int x, int y, const char cp[4], const float fp[4])
-{
- char str[256];
- float dx= 6;
- /* text colors */
- /* XXX colored text not allowed in Blender UI */
- #if 0
- unsigned char red[3] = {255, 50, 50};
- unsigned char green[3] = {0, 255, 0};
- unsigned char blue[3] = {100, 100, 255};
- #else
- unsigned char red[3] = {255, 255, 255};
- unsigned char green[3] = {255, 255, 255};
- unsigned char blue[3] = {255, 255, 255};
- #endif
- float hue=0, sat=0, val=0, lum=0, u=0, v=0;
- float col[4], finalcol[4];
-
- glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
-
- /* noisy, high contrast make impossible to read if lower alpha is used. */
- glColor4ub(0, 0, 0, 190);
- glRecti(0.0, 0.0, ar->winrct.xmax - ar->winrct.xmin + 1, 20);
- glDisable(GL_BLEND);
-
- BLF_size(blf_mono_font, 11, 72);
-
- glColor3ub(255, 255, 255);
- BLI_snprintf(str, sizeof(str), "X:%-4d Y:%-4d |", x, y);
- // UI_DrawString(6, 6, str); // works ok but fixed width is nicer.
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- #if 0 /* XXX no Z value in compo backdrop atm */
- if(zp) {
- glColor3ub(255, 255, 255);
- BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff));
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
- }
- if(zpf) {
- glColor3ub(255, 255, 255);
- BLI_snprintf(str, sizeof(str), " Z:%-.3f |", *zpf);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
- }
- #endif
-
- if(channels >= 3) {
- glColor3ubv(red);
- if (fp)
- BLI_snprintf(str, sizeof(str), " R:%-.4f", fp[0]);
- else if (cp)
- BLI_snprintf(str, sizeof(str), " R:%-3d", cp[0]);
- else
- BLI_snprintf(str, sizeof(str), " R:-");
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- glColor3ubv(green);
- if (fp)
- BLI_snprintf(str, sizeof(str), " G:%-.4f", fp[1]);
- else if (cp)
- BLI_snprintf(str, sizeof(str), " G:%-3d", cp[1]);
- else
- BLI_snprintf(str, sizeof(str), " G:-");
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- glColor3ubv(blue);
- if (fp)
- BLI_snprintf(str, sizeof(str), " B:%-.4f", fp[2]);
- else if (cp)
- BLI_snprintf(str, sizeof(str), " B:%-3d", cp[2]);
- else
- BLI_snprintf(str, sizeof(str), " B:-");
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- if(channels == 4) {
- glColor3ub(255, 255, 255);
- if (fp)
- BLI_snprintf(str, sizeof(str), " A:%-.4f", fp[3]);
- else if (cp)
- BLI_snprintf(str, sizeof(str), " A:%-3d", cp[3]);
- else
- BLI_snprintf(str, sizeof(str), "- ");
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
- }
- }
-
- /* color rectangle */
- if (channels==1) {
- if (fp)
- col[0] = col[1] = col[2] = fp[0];
- else if (cp)
- col[0] = col[1] = col[2] = (float)cp[0]/255.0f;
- else
- col[0] = col[1] = col[2] = 0.0f;
- }
- else if (channels==3) {
- if (fp)
- copy_v3_v3(col, fp);
- else if (cp) {
- col[0] = (float)cp[0]/255.0f;
- col[1] = (float)cp[1]/255.0f;
- col[2] = (float)cp[2]/255.0f;
- }
- else
- zero_v3(col);
- }
- else if (channels==4) {
- if (fp)
- copy_v4_v4(col, fp);
- else if (cp) {
- col[0] = (float)cp[0]/255.0f;
- col[1] = (float)cp[1]/255.0f;
- col[2] = (float)cp[2]/255.0f;
- col[3] = (float)cp[3]/255.0f;
- }
- else
- zero_v4(col);
- }
- if (color_manage) {
- linearrgb_to_srgb_v3_v3(finalcol, col);
- finalcol[3] = col[3];
- }
- else {
- copy_v4_v4(finalcol, col);
- }
- glDisable(GL_BLEND);
- glColor3fv(finalcol);
- dx += 5;
- glBegin(GL_QUADS);
- glVertex2f(dx, 3);
- glVertex2f(dx, 17);
- glVertex2f(dx+30, 17);
- glVertex2f(dx+30, 3);
- glEnd();
- dx += 35;
-
- glColor3ub(255, 255, 255);
- if(channels == 1) {
- if (fp) {
- rgb_to_hsv(fp[0], fp[0], fp[0], &hue, &sat, &val);
- rgb_to_yuv(fp[0], fp[0], fp[0], &lum, &u, &v);
- }
- else if (cp) {
- rgb_to_hsv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &hue, &sat, &val);
- rgb_to_yuv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &lum, &u, &v);
- }
-
- BLI_snprintf(str, sizeof(str), "V:%-.4f", val);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- BLI_snprintf(str, sizeof(str), " L:%-.4f", lum);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
- }
- else if(channels >= 3) {
- if (fp) {
- rgb_to_hsv(fp[0], fp[1], fp[2], &hue, &sat, &val);
- rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v);
- }
- else if (cp) {
- rgb_to_hsv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &hue, &sat, &val);
- rgb_to_yuv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &lum, &u, &v);
- }
-
- BLI_snprintf(str, sizeof(str), "H:%-.4f", hue);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- BLI_snprintf(str, sizeof(str), " S:%-.4f", sat);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- BLI_snprintf(str, sizeof(str), " V:%-.4f", val);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
-
- BLI_snprintf(str, sizeof(str), " L:%-.4f", lum);
- BLF_position(blf_mono_font, dx, 6, 0);
- BLF_draw_ascii(blf_mono_font, str, sizeof(str));
- dx += BLF_width(blf_mono_font, str);
- }
-
- (void)dx;
-}
-
#if 0
/* note: needs to be userpref or opengl profile option */
static void draw_nodespace_back_tex(ScrArea *sa, SpaceNode *snode)
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 3523e6bd9ab..5beac4ea212 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -71,6 +71,7 @@
#include "IMB_imbuf_types.h"
#include "ED_node.h"
+#include "ED_image.h"
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_render.h"
@@ -758,7 +759,7 @@ static void edit_node_properties(wmOperatorType *ot)
static int edit_node_invoke_properties(bContext *C, wmOperator *op)
{
- if (!RNA_property_is_set(op->ptr, "node")) {
+ if (!RNA_struct_property_is_set(op->ptr, "node")) {
bNode *node= CTX_data_pointer_get_type(C, "node", &RNA_Node).data;
if (!node)
return 0;
@@ -766,10 +767,10 @@ static int edit_node_invoke_properties(bContext *C, wmOperator *op)
RNA_string_set(op->ptr, "node", node->name);
}
- if (!RNA_property_is_set(op->ptr, "in_out"))
+ if (!RNA_struct_property_is_set(op->ptr, "in_out"))
RNA_enum_set(op->ptr, "in_out", SOCK_IN);
- if (!RNA_property_is_set(op->ptr, "socket"))
+ if (!RNA_struct_property_is_set(op->ptr, "socket"))
RNA_int_set(op->ptr, "socket", 0);
return 1;
@@ -896,13 +897,13 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
- if (RNA_property_is_set(op->ptr, "name"))
+ if (RNA_struct_property_is_set(op->ptr, "name"))
RNA_string_get(op->ptr, "name", name);
- if (RNA_property_is_set(op->ptr, "type"))
+ if (RNA_struct_property_is_set(op->ptr, "type"))
type = RNA_enum_get(op->ptr, "type");
- if (RNA_property_is_set(op->ptr, "in_out"))
+ if (RNA_struct_property_is_set(op->ptr, "in_out"))
in_out = RNA_enum_get(op->ptr, "in_out");
else
return OPERATOR_CANCELLED;
@@ -948,12 +949,12 @@ static int node_group_socket_remove_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
- if (RNA_property_is_set(op->ptr, "index"))
+ if (RNA_struct_property_is_set(op->ptr, "index"))
index = RNA_int_get(op->ptr, "index");
else
return OPERATOR_CANCELLED;
- if (RNA_property_is_set(op->ptr, "in_out"))
+ if (RNA_struct_property_is_set(op->ptr, "in_out"))
in_out = RNA_enum_get(op->ptr, "in_out");
else
return OPERATOR_CANCELLED;
@@ -999,12 +1000,12 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
- if (RNA_property_is_set(op->ptr, "index"))
+ if (RNA_struct_property_is_set(op->ptr, "index"))
index = RNA_int_get(op->ptr, "index");
else
return OPERATOR_CANCELLED;
- if (RNA_property_is_set(op->ptr, "in_out"))
+ if (RNA_struct_property_is_set(op->ptr, "in_out"))
in_out = RNA_enum_get(op->ptr, "in_out");
else
return OPERATOR_CANCELLED;
@@ -1069,12 +1070,12 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
- if (RNA_property_is_set(op->ptr, "index"))
+ if (RNA_struct_property_is_set(op->ptr, "index"))
index = RNA_int_get(op->ptr, "index");
else
return OPERATOR_CANCELLED;
- if (RNA_property_is_set(op->ptr, "in_out"))
+ if (RNA_struct_property_is_set(op->ptr, "in_out"))
in_out = RNA_enum_get(op->ptr, "in_out");
else
return OPERATOR_CANCELLED;
@@ -1343,8 +1344,10 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
{
ImageSampleInfo *info= arg_info;
- draw_nodespace_color_info(ar, (CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
- info->x, info->y, info->col, info->colf);
+ ED_image_draw_info(ar, (CTX_data_scene(C)->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
+ info->x, info->y, info->col, info->colf,
+ NULL, NULL /* zbuf - unused for nodes */
+ );
}
static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
@@ -3435,7 +3438,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
ntemp.type = -1;
/* 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);
@@ -3449,7 +3452,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
}
- else if(RNA_property_is_set(op->ptr, "name"))
+ else if(RNA_struct_property_is_set(op->ptr, "name"))
{
char name[MAX_ID_NAME-2];
RNA_string_get(op->ptr, "name", name);
@@ -3495,7 +3498,7 @@ static int node_add_file_invoke(bContext *C, wmOperator *op, wmEvent *event)
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
&snode->mx, &snode->my);
- if (RNA_property_is_set(op->ptr, "filepath") || RNA_property_is_set(op->ptr, "name"))
+ if (RNA_struct_property_is_set(op->ptr, "filepath") || RNA_struct_property_is_set(op->ptr, "name"))
return node_add_file_exec(C, op);
else
return WM_operator_filesel(C, op, event);
@@ -3534,12 +3537,12 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
/* retrieve state */
snode= CTX_wm_space_node(C);
- if (RNA_property_is_set(op->ptr, "type"))
+ if (RNA_struct_property_is_set(op->ptr, "type"))
treetype = RNA_enum_get(op->ptr, "type");
else
treetype = snode->treetype;
- if (RNA_property_is_set(op->ptr, "name"))
+ if (RNA_struct_property_is_set(op->ptr, "name"))
RNA_string_get(op->ptr, "name", treename);
ntree = ntreeAddTree(treename, treetype, 0);
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 71cb83ad231..f8abfb6f4c3 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -628,7 +628,7 @@ static uiBlock *operator_search_menu(bContext *C, ARegion *ar, void *arg_kmi)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, 256, 10, 0, 150, UI_UNIT_Y, 0, 0, "");
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, UI_UNIT_Y, 0, 0, "");
uiButSetSearchFunc(but, operator_search_cb, arg_kmi, operator_call_cb, ot);
uiBoundsBlock(block, 6);
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index a45b493ffb3..33e0136b6bb 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -57,7 +57,7 @@
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
-#if defined WIN32 && !defined _LIBC
+#if defined WIN32 && !defined _LIBC || defined __sun
# include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
#else
# ifndef _GNU_SOURCE
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 458e6453b77..f1d3d65559d 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -130,7 +130,7 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, w
RNA_int_set(op->ptr, "frame_start", (int)mval_v2d[0]);
- if ((flag & SEQPROP_ENDFRAME) && RNA_property_is_set(op->ptr, "frame_end")==0)
+ if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end")==0)
RNA_int_set(op->ptr, "frame_end", (int)mval_v2d[0] + 25); // XXX arbitary but ok for now.
if (!(flag & SEQPROP_NOPATHS)) {
@@ -264,7 +264,7 @@ static int sequencer_add_scene_strip_invoke(bContext *C, wmOperator *op, wmEvent
return OPERATOR_CANCELLED;
}
- if(!RNA_property_is_set(op->ptr, "scene"))
+ if(!RNA_struct_property_is_set(op->ptr, "scene"))
return WM_enum_search_invoke(C, op, event);
sequencer_generic_invoke_xy__internal(C, op, event, 0);
@@ -371,7 +371,7 @@ static int sequencer_add_movie_strip_invoke(bContext *C, wmOperator *op, wmEvent
}
/* This is for drag and drop */
- if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) {
+ if(RNA_collection_length(op->ptr, "files") || RNA_struct_property_is_set(op->ptr, "filepath")) {
sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS);
return sequencer_add_movie_strip_exec(C, op);
}
@@ -423,7 +423,7 @@ static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent
}
/* This is for drag and drop */
- if(RNA_collection_length(op->ptr, "files") || RNA_property_is_set(op->ptr, "filepath")) {
+ if(RNA_collection_length(op->ptr, "files") || RNA_struct_property_is_set(op->ptr, "filepath")) {
sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS);
return sequencer_add_sound_strip_exec(C, op);
}
@@ -650,7 +650,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
/* an unset channel is a special case where we automatically go above
* the other strips. */
- if(!RNA_property_is_set(op->ptr, "channel")) {
+ if(!RNA_struct_property_is_set(op->ptr, "channel")) {
if(seq->seq1) {
int chan= MAX3( seq->seq1 ? seq->seq1->machine : 0,
seq->seq2 ? seq->seq2->machine : 0,
@@ -686,7 +686,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
/* add color */
static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- short is_type_set= RNA_property_is_set(op->ptr, "type");
+ short is_type_set= RNA_struct_property_is_set(op->ptr, "type");
int type= -1;
int prop_flag= SEQPROP_ENDFRAME;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 566659e0391..e8ad6e19fd4 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -276,7 +276,7 @@ static int text_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
Text *text= CTX_data_edit_text(C);
char *path= (text && text->name)? text->name: G.main->name;
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return text_open_exec(C, op);
text_open_init(C, op);
@@ -534,7 +534,7 @@ static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
Text *text= CTX_data_edit_text(C);
char *str;
- if(RNA_property_is_set(op->ptr, "filepath"))
+ if(RNA_struct_property_is_set(op->ptr, "filepath"))
return text_save_as_exec(C, op);
if(text->name)
@@ -2209,7 +2209,7 @@ static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event)
SpaceText *st= CTX_wm_space_text(C);
TextScroll *tsc;
- if(RNA_property_is_set(op->ptr, "lines"))
+ if(RNA_struct_property_is_set(op->ptr, "lines"))
return text_scroll_exec(C, op);
tsc= MEM_callocN(sizeof(TextScroll), "TextScroll");
@@ -2289,7 +2289,7 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event)
const int *mval= event->mval;
int zone= -1;
- if(RNA_property_is_set(op->ptr, "lines"))
+ if(RNA_struct_property_is_set(op->ptr, "lines"))
return text_scroll_exec(C, op);
/* verify we are in the right zone */
@@ -2784,7 +2784,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
int ret;
- // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ // if(!RNA_struct_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
if(!RNA_string_length(op->ptr, "text")) {
/* if alt/ctrl/super are pressed pass through */
if(event->ctrl || event->oskey) {
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index e3f65bbafdf..ce8ddc3c361 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3074,8 +3074,6 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
draw_em_fancy_edges(em, scene, v3d, me, cageDM, 0, eed_act);
}
if(em) {
-// XXX retopo_matrix_update(v3d);
-
draw_em_fancy_verts(scene, v3d, ob, em, cageDM, eve_act);
if(me->drawflag & ME_DRAWNORMALS) {
@@ -5401,8 +5399,6 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
short hide_handles = (cu->drawflag & CU_HIDE_HANDLES);
int index;
-// XXX retopo_matrix_update(v3d);
-
/* DispList */
UI_ThemeColor(TH_WIRE);
drawDispList(scene, v3d, rv3d, base, dt);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index cac5d856652..196af34137a 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -553,7 +553,6 @@ static void view3d_main_area_free(ARegion *ar)
if(rv3d->localvd) MEM_freeN(rv3d->localvd);
if(rv3d->clipbb) MEM_freeN(rv3d->clipbb);
- // XXX retopo_free_view_data(rv3d);
if(rv3d->ri) {
// XXX BIF_view3d_previewrender_free(rv3d);
}
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 951aa1a5ebd..a595fc1f02b 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -193,7 +193,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
dg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr);
if(dg) {
max+= BLI_snprintf(str, sizeof(str), "%s %%x%d|", dg->name, dvert->dw[i].def_nr);
- if(max<320) strcat(defstr, str);
+ if (max < sizeof(str)) strcat(defstr, str);
}
if(tfp->curdef==dvert->dw[i].def_nr) {
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 6e591a714e4..8a0fa5324be 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1585,8 +1585,8 @@ static int viewzoom_exec(bContext *C, wmOperator *op)
v3d= sa->spacedata.first;
rv3d= ar->regiondata;
- mx= RNA_property_is_set(op->ptr, "mx") ? RNA_int_get(op->ptr, "mx") : ar->winx / 2;
- my= RNA_property_is_set(op->ptr, "my") ? RNA_int_get(op->ptr, "my") : ar->winy / 2;
+ mx= RNA_struct_property_is_set(op->ptr, "mx") ? RNA_int_get(op->ptr, "mx") : ar->winx / 2;
+ my= RNA_struct_property_is_set(op->ptr, "my") ? RNA_int_get(op->ptr, "my") : ar->winy / 2;
use_cam_zoom= (rv3d->persp==RV3D_CAMOB) && !(rv3d->is_persp && ED_view3d_camera_lock_check(v3d, rv3d));
@@ -1667,12 +1667,12 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
vod= op->customdata;
/* if one or the other zoom position aren't set, set from event */
- if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my")) {
+ if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) {
RNA_int_set(op->ptr, "mx", event->x);
RNA_int_set(op->ptr, "my", event->y);
}
- if(RNA_property_is_set(op->ptr, "delta")) {
+ if(RNA_struct_property_is_set(op->ptr, "delta")) {
viewzoom_exec(C, op);
}
else {
@@ -1880,12 +1880,12 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, wmEvent *event)
vod= op->customdata;
/* if one or the other zoom position aren't set, set from event */
- if (!RNA_property_is_set(op->ptr, "mx") || !RNA_property_is_set(op->ptr, "my")) {
+ if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) {
RNA_int_set(op->ptr, "mx", event->x);
RNA_int_set(op->ptr, "my", event->y);
}
- if(RNA_property_is_set(op->ptr, "delta")) {
+ if(RNA_struct_property_is_set(op->ptr, "delta")) {
viewdolly_exec(C, op);
}
else {
@@ -2963,13 +2963,13 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU
char name[MAX_ID_NAME-2];
/* 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);
ima= BKE_add_image_file(path);
}
- else if(RNA_property_is_set(op->ptr, "name")) {
+ else if(RNA_struct_property_is_set(op->ptr, "name")) {
RNA_string_get(op->ptr, "name", name);
ima= (Image *)find_id("IM", name);
}
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index cb6a53c67eb..86a2abe7a74 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -177,7 +177,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase)
/* fake button, it holds space for search items */
uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL);
- but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, OP_MAX_TYPENAME, 10, 0, 150, 19, 0, 0, "");
+ but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, "");
uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL);
uiBoundsBlock(block, 6);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 8a021922aa7..3ff5f7bbcba 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1410,18 +1410,18 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if (t->flag & T_MODAL) {
/* save settings if not set in operator */
- if (RNA_struct_find_property(op->ptr, "proportional") && !RNA_property_is_set(op->ptr, "proportional")) {
+ if (RNA_struct_find_property(op->ptr, "proportional") && !RNA_struct_property_is_set(op->ptr, "proportional")) {
if (t->obedit)
ts->proportional = proportional;
else
ts->proportional_objects = (proportional != PROP_EDIT_OFF);
}
- if (RNA_struct_find_property(op->ptr, "proportional_size") && !RNA_property_is_set(op->ptr, "proportional_size")) {
+ if (RNA_struct_find_property(op->ptr, "proportional_size") && !RNA_struct_property_is_set(op->ptr, "proportional_size")) {
ts->proportional_size = t->prop_size;
}
- if (RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && !RNA_property_is_set(op->ptr, "proportional_edit_falloff")) {
+ if (RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && !RNA_struct_property_is_set(op->ptr, "proportional_edit_falloff")) {
ts->prop_mode = t->prop_mode;
}
@@ -1433,7 +1433,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
if(t->spacetype == SPACE_VIEW3D) {
- if (RNA_struct_find_property(op->ptr, "constraint_orientation") && !RNA_property_is_set(op->ptr, "constraint_orientation")) {
+ if (RNA_struct_find_property(op->ptr, "constraint_orientation") && !RNA_struct_property_is_set(op->ptr, "constraint_orientation")) {
View3D *v3d = t->view;
v3d->twmode = t->current_orientation;
@@ -1706,7 +1706,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
/* overwrite initial values if operator supplied a non-null vector */
- if (RNA_property_is_set(op->ptr, "value"))
+ if (RNA_struct_property_is_set(op->ptr, "value"))
{
float values[4]= {0}; /* incase value isn't length 4, avoid uninitialized memory */
PropertyRNA *prop= RNA_struct_find_property(op->ptr, "value");
@@ -1723,7 +1723,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
}
/* Transformation axis from operator */
- if (RNA_struct_find_property(op->ptr, "axis") && RNA_property_is_set(op->ptr, "axis"))
+ if (RNA_struct_find_property(op->ptr, "axis") && RNA_struct_property_is_set(op->ptr, "axis"))
{
RNA_float_get_array(op->ptr, "axis", t->axis);
normalize_v3(t->axis);
@@ -1731,7 +1731,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
}
/* Constraint init from operator */
- if (RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_property_is_set(op->ptr, "constraint_axis"))
+ if (RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_struct_property_is_set(op->ptr, "constraint_axis"))
{
int constraint_axis[3];
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index b6f75fe1b48..e917b7d4c96 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1078,7 +1078,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
t->around = v3d->around;
- if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_property_is_set(op->ptr, "constraint_orientation"))
+ if (op && RNA_struct_find_property(op->ptr, "constraint_orientation") && RNA_struct_property_is_set(op->ptr, "constraint_orientation"))
{
t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation");
@@ -1101,7 +1101,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
/* initialize UV transform from */
if (op && RNA_struct_find_property(op->ptr, "correct_uv")) {
- if(RNA_property_is_set(op->ptr, "correct_uv")) {
+ if(RNA_struct_property_is_set(op->ptr, "correct_uv")) {
if(RNA_boolean_get(op->ptr, "correct_uv")) {
t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;
}
@@ -1147,7 +1147,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->around = V3D_CENTER;
}
- if (op && RNA_property_is_set(op->ptr, "release_confirm"))
+ if (op && RNA_struct_property_is_set(op->ptr, "release_confirm"))
{
if (RNA_boolean_get(op->ptr, "release_confirm"))
{
@@ -1162,7 +1162,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
}
- if (op && RNA_struct_find_property(op->ptr, "mirror") && RNA_property_is_set(op->ptr, "mirror"))
+ if (op && RNA_struct_find_property(op->ptr, "mirror") && RNA_struct_property_is_set(op->ptr, "mirror"))
{
if (RNA_boolean_get(op->ptr, "mirror"))
{
@@ -1183,7 +1183,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
/* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */
if (op && RNA_struct_find_property(op->ptr, "proportional"))
{
- if (RNA_property_is_set(op->ptr, "proportional"))
+ if (RNA_struct_property_is_set(op->ptr, "proportional"))
{
switch(RNA_enum_get(op->ptr, "proportional"))
{
@@ -1216,7 +1216,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
}
}
- if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_property_is_set(op->ptr, "proportional_size"))
+ if (op && RNA_struct_find_property(op->ptr, "proportional_size") && RNA_struct_property_is_set(op->ptr, "proportional_size"))
{
t->prop_size = RNA_float_get(op->ptr, "proportional_size");
}
@@ -1233,7 +1233,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->prop_size = 1.0f;
}
- if (op && RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && RNA_property_is_set(op->ptr, "proportional_edit_falloff"))
+ if (op && RNA_struct_find_property(op->ptr, "proportional_edit_falloff") && RNA_struct_property_is_set(op->ptr, "proportional_edit_falloff"))
{
t->prop_mode = RNA_enum_get(op->ptr, "proportional_edit_falloff");
}
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 81a2b7158ee..b7aba109cdd 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -429,7 +429,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
- if(RNA_property_is_set(op->ptr, "value")) {
+ if(RNA_struct_property_is_set(op->ptr, "value")) {
return transform_exec(C, op);
}
else {
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 4514b36f3a5..332af6fdfcf 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -447,18 +447,18 @@ void initSnapping(TransInfo *t, wmOperator *op)
resetSnapping(t);
/* if snap property exists */
- if (op && RNA_struct_find_property(op->ptr, "snap") && RNA_property_is_set(op->ptr, "snap"))
+ if (op && RNA_struct_find_property(op->ptr, "snap") && RNA_struct_property_is_set(op->ptr, "snap"))
{
if (RNA_boolean_get(op->ptr, "snap"))
{
t->modifiers |= MOD_SNAP;
- if (RNA_property_is_set(op->ptr, "snap_target"))
+ if (RNA_struct_property_is_set(op->ptr, "snap_target"))
{
snap_target = RNA_enum_get(op->ptr, "snap_target");
}
- if (RNA_property_is_set(op->ptr, "snap_point"))
+ if (RNA_struct_property_is_set(op->ptr, "snap_point"))
{
RNA_float_get_array(op->ptr, "snap_point", t->tsnap.snapPoint);
t->tsnap.status |= SNAP_FORCED|POINT_INIT;
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index be596a9a4a9..56a835beeb8 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -524,7 +524,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
/* note: also check ed_undo_step() in top if you change notifiers */
static int undo_history_exec(bContext *C, wmOperator *op)
{
- if(RNA_property_is_set(op->ptr, "item")) {
+ if(RNA_struct_property_is_set(op->ptr, "item")) {
int undosys= get_undo_system(C);
int item= RNA_int_get(op->ptr, "item");
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index f3019448240..3ed0cd02838 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -540,7 +540,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- if(RNA_property_is_set(op->ptr, "margin")) {
+ if(RNA_struct_property_is_set(op->ptr, "margin")) {
scene->toolsettings->uvcalc_margin= RNA_float_get(op->ptr, "margin");
}
else {