branches/2-44-stable
Merge from trunk: revision 10862:10863 Bugfix in SSS Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10863 revision 10863:10864 (Bugfix #6799) Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10864 revision 10866:10867 (Bugfix #6798) Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10867 revision 10870:10871 (Bugfix #6688) Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10871 revision 10872:10873 When the char panel was displayed it would mess up font size for other panels. Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10873
This commit is contained in:
parent
5898cd391b
commit
9125899745
|
@ -1541,6 +1541,7 @@ typedef struct pMatrixCache {
|
|||
|
||||
|
||||
/* WARN: this function stores data in ob->id.idnew! */
|
||||
/* error: this function changes ob->recalc of other objects... */
|
||||
static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
|
||||
{
|
||||
pMatrixCache *mcache, *mc;
|
||||
|
@ -1561,16 +1562,17 @@ static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
|
|||
sfo= ob->sf;
|
||||
ob->sf= 0.0f;
|
||||
|
||||
/* clear storage */
|
||||
for(obcopy= G.main->object.first; obcopy; obcopy= obcopy->id.next)
|
||||
/* clear storage, copy recalc tag (bad loop) */
|
||||
for(obcopy= G.main->object.first; obcopy; obcopy= obcopy->id.next) {
|
||||
obcopy->id.newid= NULL;
|
||||
obcopy->recalco= obcopy->recalc;
|
||||
obcopy->recalc= 0;
|
||||
}
|
||||
|
||||
/* all objects get tagged recalc that influence this object (does group too) */
|
||||
/* another hack; while transform you cannot call this, it sets own recalc flags */
|
||||
if(G.moving==0) {
|
||||
ob->recalc |= OB_RECALC_OB; /* make sure a recalc gets flushed */
|
||||
DAG_object_update_flags(G.scene, ob, -1);
|
||||
}
|
||||
/* note that recalco has the real recalc tags, set by callers of this function */
|
||||
ob->recalc |= OB_RECALC_OB; /* make sure a recalc gets flushed */
|
||||
DAG_object_update_flags(G.scene, ob, -1);
|
||||
|
||||
for(G.scene->r.cfra= start; G.scene->r.cfra<=end; G.scene->r.cfra++, mc++) {
|
||||
|
||||
|
@ -1649,7 +1651,12 @@ static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* copy recalc tag (bad loop) */
|
||||
for(obcopy= G.main->object.first; obcopy; obcopy= obcopy->id.next)
|
||||
obcopy->recalc= obcopy->recalco;
|
||||
|
||||
return mcache;
|
||||
}
|
||||
|
||||
|
@ -2088,6 +2095,7 @@ void build_particle_system(Object *ob)
|
|||
/* reset deflector cache */
|
||||
for(base= G.scene->base.first; base; base= base->next) {
|
||||
if(base->object->sumohandle) {
|
||||
|
||||
MEM_freeN(base->object->sumohandle);
|
||||
base->object->sumohandle= NULL;
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ typedef struct Object {
|
|||
|
||||
short shapenr, shapeflag; /* current shape key for menu or pinned, flag for pinning */
|
||||
float smoothresh; /* smoothresh is phong interpolation ray_shadow correction in render */
|
||||
int pad4;
|
||||
short recalco, pad4; /* recalco for temp storage of ob->recalc, bad design warning */
|
||||
|
||||
struct FluidsimSettings *fluidsimSettings; /* if fluidsim enabled, store additional settings */
|
||||
|
||||
|
|
|
@ -2970,6 +2970,7 @@ static int Object_setNLAflagBits ( BPy_Object * self, PyObject * args )
|
|||
static PyObject *Object_getDupliObjects( BPy_Object * self )
|
||||
{
|
||||
Object *ob= self->object;
|
||||
PyObject *pair;
|
||||
|
||||
if(ob->transflag & OB_DUPLI) {
|
||||
/* before make duplis, update particle for current frame */
|
||||
|
|
|
@ -473,7 +473,7 @@ static void sum_leaf_radiance(ScatterTree *tree, ScatterNode *node)
|
|||
for(i=0; i<node->totpoint; i++) {
|
||||
p= &node->points[i];
|
||||
|
||||
rad= p->area*(p->rad[0] + p->rad[1] + p->rad[2]);
|
||||
rad= p->area*fabs(p->rad[0] + p->rad[1] + p->rad[2]);
|
||||
totrad += rad;
|
||||
|
||||
node->co[0] += rad*p->co[0];
|
||||
|
@ -550,8 +550,8 @@ static void sum_branch_radiance(ScatterTree *tree, ScatterNode *node)
|
|||
|
||||
subnode= node->child[i];
|
||||
|
||||
rad= subnode->area*(subnode->rad[0] + subnode->rad[1] + subnode->rad[2]);
|
||||
rad += subnode->backarea*(subnode->backrad[0] + subnode->backrad[1] + subnode->backrad[2]);
|
||||
rad= subnode->area*fabs(subnode->rad[0] + subnode->rad[1] + subnode->rad[2]);
|
||||
rad += subnode->backarea*fabs(subnode->backrad[0] + subnode->backrad[1] + subnode->backrad[2]);
|
||||
totrad += rad;
|
||||
|
||||
node->co[0] += rad*subnode->co[0];
|
||||
|
|
|
@ -602,11 +602,7 @@ void do_common_editbuts(unsigned short event) // old name, is a mix of object an
|
|||
break;
|
||||
|
||||
case B_ADDKEY:
|
||||
if(get_mesh(ob) && get_mesh(ob)->mr) {
|
||||
error("Cannot create shape keys on a multires mesh.");
|
||||
} else {
|
||||
insert_shapekey(ob);
|
||||
}
|
||||
insert_shapekey(ob);
|
||||
break;
|
||||
case B_SETKEY:
|
||||
ob->shapeflag |= OB_SHAPE_TEMPLOCK;
|
||||
|
|
|
@ -67,6 +67,7 @@
|
|||
#include "BKE_key.h"
|
||||
#include "BKE_library.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
|
@ -599,21 +600,26 @@ void insert_curvekey(Curve *cu, short rel)
|
|||
|
||||
void insert_shapekey(Object *ob)
|
||||
{
|
||||
Key *key;
|
||||
if(get_mesh(ob) && get_mesh(ob)->mr) {
|
||||
error("Cannot create shape keys on a multires mesh.");
|
||||
}
|
||||
else {
|
||||
Key *key;
|
||||
|
||||
if(ob->type==OB_MESH) insert_meshkey(ob->data, 1);
|
||||
else if ELEM(ob->type, OB_CURVE, OB_SURF) insert_curvekey(ob->data, 1);
|
||||
else if(ob->type==OB_LATTICE) insert_lattkey(ob->data, 1);
|
||||
if(ob->type==OB_MESH) insert_meshkey(ob->data, 1);
|
||||
else if ELEM(ob->type, OB_CURVE, OB_SURF) insert_curvekey(ob->data, 1);
|
||||
else if(ob->type==OB_LATTICE) insert_lattkey(ob->data, 1);
|
||||
|
||||
key= ob_get_key(ob);
|
||||
ob->shapenr= BLI_countlist(&key->block);
|
||||
key= ob_get_key(ob);
|
||||
ob->shapenr= BLI_countlist(&key->block);
|
||||
|
||||
allspace(REMAKEIPO, 0);
|
||||
allqueue(REDRAWIPO, 0);
|
||||
allqueue(REDRAWACTION, 0);
|
||||
allqueue(REDRAWNLA, 0);
|
||||
allqueue(REDRAWBUTSOBJECT, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allspace(REMAKEIPO, 0);
|
||||
allqueue(REDRAWIPO, 0);
|
||||
allqueue(REDRAWACTION, 0);
|
||||
allqueue(REDRAWNLA, 0);
|
||||
allqueue(REDRAWBUTSOBJECT, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void delete_key(Object *ob)
|
||||
|
|
|
@ -1785,7 +1785,7 @@ static void ui_draw_but_CHARTAB(uiBut *but)
|
|||
PackedFile *pf;
|
||||
int result = 0;
|
||||
int charmax = G.charmax;
|
||||
|
||||
|
||||
/* <builtin> font in use. There are TTF <builtin> and non-TTF <builtin> fonts */
|
||||
if(!strcmp(G.selfont->name, "<builtin>"))
|
||||
{
|
||||
|
@ -1947,6 +1947,12 @@ static void ui_draw_but_CHARTAB(uiBut *but)
|
|||
{
|
||||
result = FTF_SetFont((unsigned char *) datatoc_bfont_ttf, datatoc_bfont_ttf_size, 11);
|
||||
}
|
||||
|
||||
/* resets the font size */
|
||||
if(G.ui_international == TRUE)
|
||||
{
|
||||
uiSetCurFont(but->block, UI_HELV);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // INTERNATIONAL
|
||||
|
|
|
@ -1096,13 +1096,22 @@ void calc_damaged_verts(ListBase *damaged_verts, GrabData *grabdata)
|
|||
BrushData *sculptmode_brush(void)
|
||||
{
|
||||
SculptData *sd= &G.scene->sculptdata;
|
||||
return (sd->brush_type==DRAW_BRUSH ? &sd->drawbrush :
|
||||
sd->brush_type==SMOOTH_BRUSH ? &sd->smoothbrush :
|
||||
sd->brush_type==PINCH_BRUSH ? &sd->pinchbrush :
|
||||
sd->brush_type==INFLATE_BRUSH ? &sd->inflatebrush :
|
||||
sd->brush_type==GRAB_BRUSH ? &sd->grabbrush :
|
||||
sd->brush_type==LAYER_BRUSH ? &sd->layerbrush :
|
||||
sd->brush_type==FLATTEN_BRUSH ? &sd->flattenbrush : NULL);
|
||||
|
||||
BrushData *bd =
|
||||
(sd->brush_type==DRAW_BRUSH ? &sd->drawbrush :
|
||||
sd->brush_type==SMOOTH_BRUSH ? &sd->smoothbrush :
|
||||
sd->brush_type==PINCH_BRUSH ? &sd->pinchbrush :
|
||||
sd->brush_type==INFLATE_BRUSH ? &sd->inflatebrush :
|
||||
sd->brush_type==GRAB_BRUSH ? &sd->grabbrush :
|
||||
sd->brush_type==LAYER_BRUSH ? &sd->layerbrush :
|
||||
sd->brush_type==FLATTEN_BRUSH ? &sd->flattenbrush : NULL);
|
||||
|
||||
if(!bd) {
|
||||
sculptmode_init(G.scene);
|
||||
bd = &sd->drawbrush;
|
||||
}
|
||||
|
||||
return bd;
|
||||
}
|
||||
|
||||
void sculptmode_update_tex()
|
||||
|
@ -1853,8 +1862,8 @@ void set_sculptmode(void)
|
|||
else {
|
||||
G.f |= G_SCULPTMODE;
|
||||
|
||||
if(!sculptmode_brush())
|
||||
sculptmode_init(G.scene);
|
||||
/* Called here to sanity-check the brush */
|
||||
sculptmode_brush();
|
||||
|
||||
sculpt_init_session();
|
||||
|
||||
|
|
Loading…
Reference in New Issue