Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton
2017-04-06 12:04:48 +10:00
2 changed files with 9 additions and 11 deletions

View File

@@ -531,7 +531,7 @@ ScopeTimer::~ScopeTimer()
bool SimpleLogger::empty()
{
return m_stream.tellp() == 0ul;
return ((size_t)m_stream.tellp()) == 0ul;
}
std::string SimpleLogger::str() const

View File

@@ -145,21 +145,17 @@ static void protectflag_to_drawflags(short protectflag, short *drawflags)
}
/* for pose mode */
static void stats_pose(Scene *scene, RegionView3D *rv3d, bPoseChannel *pchan)
static void stats_pchan(RegionView3D *rv3d, bPoseChannel *pchan)
{
Bone *bone = pchan->bone;
if (bone) {
calc_tw_center(scene, pchan->pose_head);
protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag);
}
protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag);
}
/* for editmode*/
static void stats_editbone(RegionView3D *rv3d, EditBone *ebo)
{
if (ebo->flag & BONE_EDITMODE_LOCKED)
if (ebo->flag & BONE_EDITMODE_LOCKED) {
protectflag_to_drawflags(OB_LOCK_LOC | OB_LOCK_ROT | OB_LOCK_SCALE, &rv3d->twdrawflag);
}
}
/* could move into BLI_math however this is only useful for display/editing purposes */
@@ -531,7 +527,8 @@ static int calc_manipulator_stats(const bContext *C)
/* doesn't check selection or visibility intentionally */
Bone *bone = pchan->bone;
if (bone) {
stats_pose(scene, rv3d, pchan);
calc_tw_center(scene, pchan->pose_head);
stats_pchan(rv3d, pchan);
totsel = 1;
ok = true;
}
@@ -544,7 +541,8 @@ static int calc_manipulator_stats(const bContext *C)
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
Bone *bone = pchan->bone;
if (bone && (bone->flag & BONE_TRANSFORM)) {
stats_pose(scene, rv3d, pchan);
calc_tw_center(scene, pchan->pose_head);
stats_pchan(rv3d, pchan);
}
}
ok = true;