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:
authormano-wii <germano.costa@ig.com.br>2018-11-19 15:28:31 +0300
committermano-wii <germano.costa@ig.com.br>2018-11-19 15:28:31 +0300
commit51711fdcaa48e37e1d6cf3dfb27d8d234786bd1b (patch)
treec293147d9e26d11cfe71bc01723c624f03e25c75 /source/blender/blenkernel
parent3f59bdc1bd0a380d464896e982204ba48c50e3b1 (diff)
Revert "BKE object: Correct bound box of bezier curve objects not matching the object viewed."
This reverts commit 24677cf77bbd97827bb5789bc1e4d883732a59da.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_displist.h1
-rw-r--r--source/blender/blenkernel/intern/displist.c18
-rw-r--r--source/blender/blenkernel/intern/object.c2
3 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index b7e0e28d9f0..02c86642b11 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -108,6 +108,5 @@ void BKE_displist_fill(struct ListBase *dispbase, struct ListBase *to, const flo
float BKE_displist_calc_taper(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *taperobj, int cur, int tot);
void BKE_displist_minmax(struct ListBase *dispbase, float min[3], float max[3]);
-struct BoundBox *BKE_displist_boundbox_get(struct Object *ob);
#endif
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 3339118f8e3..8d49521831f 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -65,13 +65,10 @@
#include "BKE_modifier.h"
#include "BLI_sys_types.h" // for intptr_t support
-#include "BLI_threads.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
-static ThreadRWMutex cache_rwlock = BLI_RWLOCK_INITIALIZER;
-
static void boundbox_displist_object(Object *ob);
void BKE_displist_elem_free(DispList *dl)
@@ -1801,7 +1798,6 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, Scene *scene, Object *ob
if (!ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT))
return;
- BLI_rw_mutex_lock(&cache_rwlock, THREAD_LOCK_WRITE);
BKE_object_free_derived_caches(ob);
if (!ob->runtime.curve_cache) {
@@ -1813,7 +1809,6 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, Scene *scene, Object *ob
do_makeDispListCurveTypes(depsgraph, scene, ob, dispbase, &ob->runtime.mesh_eval, 0, for_orco, 0);
boundbox_displist_object(ob);
- BLI_rw_mutex_unlock(&cache_rwlock);
}
void BKE_displist_make_curveTypes_forRender(
@@ -1887,16 +1882,3 @@ static void boundbox_displist_object(Object *ob)
}
}
}
-
-BoundBox *BKE_displist_boundbox_get(struct Object *ob)
-{
- BLI_rw_mutex_lock(&cache_rwlock, THREAD_LOCK_READ);
- if ((ob->bb == NULL) || (ob->bb->flag & BOUNDBOX_DIRTY)) {
- /* This should always only be called with evaluated objects, but currently RNA is a problem here... */
- if (ob->runtime.curve_cache != NULL) {
- boundbox_displist_object(ob);
- }
- }
- BLI_rw_mutex_unlock(&cache_rwlock);
- return ob->bb;
-}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 3e2367aed1b..d36a5838630 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2515,7 +2515,7 @@ BoundBox *BKE_object_boundbox_get(Object *ob)
case OB_CURVE:
case OB_SURF:
case OB_FONT:
- bb = BKE_displist_boundbox_get(ob);
+ bb = BKE_curve_boundbox_get(ob);
break;
case OB_MBALL:
bb = BKE_mball_boundbox_get(ob);