fix for own error in active bone commit, wasnt checking object type was an armature
also fix for warning with printf
This commit is contained in:
parent
af2e6c38e9
commit
1f2fe7ec14
|
@ -224,17 +224,19 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
|
|||
}
|
||||
}
|
||||
else if(CTX_data_equals(member, "active_bone")) {
|
||||
bArmature *arm= (obact) ? obact->data : NULL;
|
||||
if(arm->edbo) {
|
||||
if(arm->act_edbone) {
|
||||
CTX_data_pointer_set(result, &arm->id, &RNA_EditBone, arm->act_edbone);
|
||||
return 1;
|
||||
if(obact && obact->type == OB_ARMATURE) {
|
||||
bArmature *arm= obact->data;
|
||||
if(arm->edbo) {
|
||||
if(arm->act_edbone) {
|
||||
CTX_data_pointer_set(result, &arm->id, &RNA_EditBone, arm->act_edbone);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(arm->act_bone) {
|
||||
CTX_data_pointer_set(result, &arm->id, &RNA_Bone, arm->act_bone);
|
||||
return 1;
|
||||
else {
|
||||
if(arm->act_bone) {
|
||||
CTX_data_pointer_set(result, &arm->id, &RNA_Bone, arm->act_bone);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ void SCA_ExpressionController::Trigger(SCA_LogicManager* logicmgr)
|
|||
{
|
||||
if (value->IsError())
|
||||
{
|
||||
printf(value->GetText());
|
||||
printf("%s\n", value->GetText().ReadPtr());
|
||||
} else
|
||||
{
|
||||
float num = (float)value->GetNumber();
|
||||
|
|
Loading…
Reference in New Issue