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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-16 17:22:28 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-16 18:12:03 +0300
commit3e3e7ee41c9c04ef1630eef46c71434d152c55dc (patch)
tree65ee42534511a7c0b29be372d5072529b8960396 /source/blender/makesrna/intern
parent6568b6d1cdcaf32487bbcd48b4d20da32954c6f5 (diff)
Sculpt draw code:
Remove legacy code completely, now dyntopo, multires et al even work on GL 1.1 for really hardcore users :p Real purpose here though is to be able to have fast multires drawing even with VBO off, since it requires using indices for vertex buffers. Also made own code elf puke an eaten normal update function which made multires not update normals in solid mode...sorry.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 9604f643149..cf327583d47 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -91,6 +91,8 @@ EnumPropertyItem navigation_mode_items[] = {
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_idprop.h"
+#include "BKE_pbvh.h"
+#include "BKE_paint.h"
#include "GPU_draw.h"
#include "GPU_select.h"
@@ -141,13 +143,23 @@ static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene
UI_reinit_font();
}
+static void update_cb(PBVHNode *node, void *UNUSED(rebuild))
+{
+ BKE_pbvh_node_mark_rebuild_draw(node);
+}
+
static void rna_userdef_vbo_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
{
Object *ob;
for (ob = bmain->object.first; ob; ob = ob->id.next) {
GPU_drawobject_free(ob->derivedFinal);
+
+ if (ob->sculpt && ob->sculpt->pbvh) {
+ BKE_pbvh_search_callback(ob->sculpt->pbvh, NULL, NULL, update_cb, NULL);
+ }
}
+ GPU_buffer_multires_free(false);
}
static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, PointerRNA *ptr)