svn merge ^/trunk/blender -r42655:42660
This commit is contained in:
@@ -926,7 +926,8 @@ static int MirrTopo_item_sort(const void *v1, const void *v2)
|
||||
}
|
||||
|
||||
static long *mesh_topo_lookup = NULL;
|
||||
static int mesh_topo_lookup_tot = -1;
|
||||
static int mesh_topo_lookup_vert_tot = -1;
|
||||
static int mesh_topo_lookup_edge_tot = -1;
|
||||
static int mesh_topo_lookup_mode = -1;
|
||||
|
||||
/* mode is 's' start, or 'e' end, or 'u' use */
|
||||
@@ -937,8 +938,10 @@ long mesh_mirrtopo_table(Object *ob, char mode)
|
||||
Mesh *me= ob->data;
|
||||
if( (mesh_topo_lookup==NULL) ||
|
||||
(mesh_topo_lookup_mode != ob->mode) ||
|
||||
(me->edit_btmesh && me->edit_btmesh->bm->totvert != mesh_topo_lookup_tot) ||
|
||||
(me->edit_btmesh==NULL && me->totvert != mesh_topo_lookup_tot)
|
||||
(me->edit_btmesh && me->edit_btmesh->bm->totvert != mesh_topo_lookup_vert_tot) ||
|
||||
(me->edit_btmesh && me->edit_btmesh->bm->totedge != mesh_topo_lookup_edge_tot) ||
|
||||
(me->edit_btmesh==NULL && me->totvert != mesh_topo_lookup_vert_tot) ||
|
||||
(me->edit_btmesh==NULL && me->totedge != mesh_topo_lookup_edge_tot)
|
||||
) {
|
||||
mesh_mirrtopo_table(ob, 's');
|
||||
}
|
||||
@@ -951,7 +954,8 @@ long mesh_mirrtopo_table(Object *ob, char mode)
|
||||
MIRRHASH_TYPE *MirrTopoHash = NULL;
|
||||
MIRRHASH_TYPE *MirrTopoHash_Prev = NULL;
|
||||
MirrTopoPair *MirrTopoPairs;
|
||||
int a, last, totvert;
|
||||
int a, last;
|
||||
int totvert, totedge;
|
||||
int totUnique= -1, totUniqueOld= -1;
|
||||
|
||||
mesh_topo_lookup_mode= ob->mode;
|
||||
@@ -975,12 +979,15 @@ long mesh_mirrtopo_table(Object *ob, char mode)
|
||||
|
||||
/* Initialize the vert-edge-user counts used to detect unique topology */
|
||||
if(em) {
|
||||
totedge= me->edit_btmesh->bm->totedge;
|
||||
BM_ITER(eed, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
|
||||
MirrTopoHash[BM_GetIndex(eed->v1)]++;
|
||||
MirrTopoHash[BM_GetIndex(eed->v2)]++;
|
||||
}
|
||||
} else {
|
||||
for(a=0, medge=me->medge; a<me->totedge; a++, medge++) {
|
||||
totedge= me->totedge;
|
||||
|
||||
for(a=0, medge=me->medge; a < me->totedge; a++, medge++) {
|
||||
MirrTopoHash[medge->v1]++;
|
||||
MirrTopoHash[medge->v2]++;
|
||||
}
|
||||
@@ -1078,14 +1085,16 @@ long mesh_mirrtopo_table(Object *ob, char mode)
|
||||
MEM_freeN( MirrTopoHash );
|
||||
MEM_freeN( MirrTopoHash_Prev );
|
||||
|
||||
mesh_topo_lookup_tot = totvert;
|
||||
mesh_topo_lookup_vert_tot = totvert;
|
||||
mesh_topo_lookup_edge_tot = totedge;
|
||||
|
||||
} else if(mode=='e') { /* end table */
|
||||
if (mesh_topo_lookup) {
|
||||
MEM_freeN(mesh_topo_lookup);
|
||||
}
|
||||
mesh_topo_lookup = NULL;
|
||||
mesh_topo_lookup_tot= -1;
|
||||
mesh_topo_lookup_vert_tot= -1;
|
||||
mesh_topo_lookup_edge_tot= -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -632,7 +632,7 @@ void TRANSFORM_OT_warp(struct wmOperatorType *ot)
|
||||
ot->cancel = transform_cancel;
|
||||
ot->poll = ED_operator_screenactive;
|
||||
|
||||
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", 0, 1);
|
||||
RNA_def_float_rotation(ot->srna, "value", 1, NULL, -FLT_MAX, FLT_MAX, "Angle", "", -M_PI*2, M_PI*2);
|
||||
|
||||
Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP);
|
||||
// XXX Warp axis?
|
||||
|
||||
@@ -260,6 +260,7 @@ PyObject *BPY_app_struct(void)
|
||||
/* prevent user from creating new instances */
|
||||
BlenderAppType.tp_init= NULL;
|
||||
BlenderAppType.tp_new= NULL;
|
||||
BlenderAppType.tp_hash= (hashfunc)_Py_HashPointer; /* without this we can't do set(sys.modules) [#29635] */
|
||||
|
||||
/* kindof a hack ontop of PyStructSequence */
|
||||
py_struct_seq_getset_init();
|
||||
|
||||
@@ -210,6 +210,7 @@ PyObject *BPY_app_handlers_struct(void)
|
||||
/* prevent user from creating new instances */
|
||||
BlenderAppCbType.tp_init= NULL;
|
||||
BlenderAppCbType.tp_new= NULL;
|
||||
BlenderAppCbType.tp_hash= (hashfunc)_Py_HashPointer; /* without this we can't do set(sys.modules) [#29635] */
|
||||
|
||||
/* assign the C callbacks */
|
||||
if (ret) {
|
||||
|
||||
@@ -94,13 +94,12 @@ int bpy_pydriver_create_dict(void)
|
||||
|
||||
/* note, this function should do nothing most runs, only when changing frame */
|
||||
static PyObject *bpy_pydriver_InternStr__frame= NULL;
|
||||
/* not thread safe but neither is python */
|
||||
static float bpy_pydriver_evaltime_prev= FLT_MAX;
|
||||
|
||||
static void bpy_pydriver_update_dict(const float evaltime)
|
||||
{
|
||||
/* not thread safe but neither is python */
|
||||
static float evaltime_prev= FLT_MAX;
|
||||
|
||||
if (evaltime_prev != evaltime) {
|
||||
if (bpy_pydriver_evaltime_prev != evaltime) {
|
||||
|
||||
/* currently only update the frame */
|
||||
if (bpy_pydriver_InternStr__frame == NULL) {
|
||||
@@ -111,7 +110,7 @@ static void bpy_pydriver_update_dict(const float evaltime)
|
||||
bpy_pydriver_InternStr__frame,
|
||||
PyFloat_FromDouble(evaltime));
|
||||
|
||||
evaltime_prev= evaltime;
|
||||
bpy_pydriver_evaltime_prev= evaltime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,6 +136,7 @@ void BPY_driver_reset(void)
|
||||
if (bpy_pydriver_InternStr__frame) {
|
||||
Py_DECREF(bpy_pydriver_InternStr__frame);
|
||||
bpy_pydriver_InternStr__frame= NULL;
|
||||
bpy_pydriver_evaltime_prev= FLT_MAX;
|
||||
}
|
||||
|
||||
if (use_gil)
|
||||
|
||||
Reference in New Issue
Block a user