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:
authorMiika Hamalainen <blender@miikah.org>2011-10-31 17:18:14 +0400
committerMiika Hamalainen <blender@miikah.org>2011-10-31 17:18:14 +0400
commitcd338a4130011ed9eccc7b131b11e4261b9dc269 (patch)
tree767bb3edaa08fef0bb6ff039fced376f9a00e9c3 /source/blender/editors
parent0a37e6ab976344818483df899b4fc44aedb30613 (diff)
parenta664e779ac8be0f926221d4c064394f9b3b6a801 (diff)
Merge with trunk r41411
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_templates.c30
-rw-r--r--source/blender/editors/mesh/editface.c1
-rw-r--r--source/blender/editors/physics/CMakeLists.txt4
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
-rw-r--r--source/blender/editors/render/render_opengl.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c1
7 files changed, 29 insertions, 27 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 0391c16a8f7..89b9f74d851 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2068,7 +2068,7 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int
return rnaicon;
}
-static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop, const char *prop_list)
+static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop, const char *prop_list_id)
{
uiBlock *block= uiLayoutGetBlock(layout);
uiBut *but;
@@ -2212,8 +2212,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
* … you’ll get a numfield for the integer prop, a check box for the bool prop, and a textfield
* for the string prop, after the name of each item of the collection.
*/
- else if (prop_list) {
- PropertyRNA *prop_ctrls;
+ else if (prop_list_id) {
row = uiLayoutRow(sub, 1);
uiItemL(row, name, icon);
@@ -2222,18 +2221,21 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
* which would obviously produce a sigsev… */
if (itemptr->type) {
/* If the special property is set for the item, and it is a collection… */
- prop_ctrls = RNA_struct_find_property(itemptr, prop_list);
- if(prop_ctrls) {
- if(RNA_property_type(prop_ctrls) == PROP_STRING) {
- char *prop_names = RNA_property_string_get_alloc(itemptr, prop_ctrls, NULL, 0, NULL);
- char *id = NULL;
- char *ctx = NULL;
- for(id = BLI_strtok_r(prop_names, ":", &ctx); id; id = BLI_strtok_r(NULL, ":", &ctx)) {
- uiItemR(row, itemptr, id, 0, NULL, 0);
- MEM_freeN(id);
- }
- MEM_freeN(prop_names);
+ PropertyRNA *prop_list= RNA_struct_find_property(itemptr, prop_list_id);
+
+ if(prop_list && RNA_property_type(prop_list) == PROP_STRING) {
+ int prop_names_len;
+ char *prop_names = RNA_property_string_get_alloc(itemptr, prop_list, NULL, 0, &prop_names_len);
+ char *prop_names_end= prop_names + prop_names_len;
+ char *id= prop_names;
+ char *id_next;
+ while (id < prop_names_end) {
+ if ((id_next= strchr(id, ':'))) *id_next++= '\0';
+ else id_next= prop_names_end;
+ uiItemR(row, itemptr, id, 0, NULL, 0);
+ id= id_next;
}
+ MEM_freeN(prop_names);
}
}
}
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c
index 279657e71c2..02d20e64bc3 100644
--- a/source/blender/editors/mesh/editface.c
+++ b/source/blender/editors/mesh/editface.c
@@ -346,7 +346,6 @@ void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]
paintface_flush_flags(ob);
}
-/* note: caller needs to run paintface_flush_flags(ob) after this */
void paintface_deselect_all_visible(Object *ob, int action, short flush_flags)
{
Mesh *me;
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index 3fc05684fc9..4d43c618568 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -46,8 +46,8 @@ set(SRC
physics_intern.h
)
-if(NOT WITH_MOD_FLUID)
- add_definitions(-DDISABLE_ELBEEM)
+if(WITH_MOD_FLUID)
+ add_definitions(-DWITH_MOD_FLUID)
endif()
if(WITH_OPENMP)
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index f0c327b9279..6e88d477d9c 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -85,7 +85,7 @@
#include "physics_intern.h" // own include
/* enable/disable overall compilation */
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
#include "WM_api.h"
@@ -1111,7 +1111,7 @@ void fluidsimFreeBake(Object *UNUSED(ob))
/* not implemented yet */
}
-#else /* DISABLE_ELBEEM */
+#else /* WITH_MOD_FLUID */
/* compile dummy functions for disabled fluid sim */
@@ -1135,7 +1135,7 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
return 0;
}
-#endif /* DISABLE_ELBEEM */
+#endif /* WITH_MOD_FLUID */
/***************************** Operators ******************************/
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index feeb2fefca7..fa764e6eefc 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -154,7 +154,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
if((scene->r.mode & R_OSA) == 0) {
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat);
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, rr->rectf);
+ GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, rr->rectf);
}
else {
/* simple accumulation, less hassle then FSAA FBO's */
@@ -167,7 +167,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
/* first sample buffer, also initializes 'rv3d->persmat' */
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat);
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, accum_buffer);
+ GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_buffer);
/* skip the first sample */
for(j=1; j < SAMPLES; j++) {
@@ -175,7 +175,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
window_translate_m4(winmat_jitter, rv3d->persmat, jit_ofs[j][0] / sizex, jit_ofs[j][1] / sizey);
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat_jitter);
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, accum_tmp);
+ GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_tmp);
add_vn_vn(accum_buffer, accum_tmp, sizex*sizey*sizeof(float));
}
@@ -278,7 +278,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
sizey= (scene->r.size*scene->r.ysch)/100;
/* corrects render size with actual size, not every card supports non-power-of-two dimensions */
- ofs= GPU_offscreen_create(&sizex, &sizey, err_out);
+ ofs= GPU_offscreen_create(sizex, sizey, err_out);
if(!ofs) {
BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer, %s", err_out);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 20b1df6ef2c..32e553262e2 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2379,7 +2379,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
glPushAttrib(GL_LIGHTING_BIT);
/* bind */
- ofs= GPU_offscreen_create(&sizex, &sizey, err_out);
+ ofs= GPU_offscreen_create(sizex, sizey, err_out);
if(ofs == NULL)
return NULL;
@@ -2403,9 +2403,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
ibuf= IMB_allocImBuf(sizex, sizey, 32, flag);
if(ibuf->rect_float)
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, ibuf->rect_float);
+ GPU_offscreen_read_pixels(ofs, GL_FLOAT, ibuf->rect_float);
else if(ibuf->rect)
- glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
+ GPU_offscreen_read_pixels(ofs, GL_UNSIGNED_BYTE, ibuf->rect);
//if((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW))
// BKE_stamp_buf(scene, NULL, rr->rectf, rr->rectx, rr->recty, 4);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 99f11554aa6..ea8db17daf0 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -2946,6 +2946,7 @@ static BGpic *background_image_add(bContext *C)
bgpic->iuser.fie_ima= 2;
bgpic->iuser.ok= 1;
bgpic->view= 0; /* 0 for all */
+ bgpic->flag |= V3D_BGPIC_EXPANDED;
BLI_addtail(&v3d->bgpicbase, bgpic);