Merged changes in the trunk up to revision 50829.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/render/intern/source/convertblender.c source/blender/render/intern/source/pipeline.c Also addressed code inconsistency due to changes in the trunk revision 50628 (color management with OCIO) and 50806 (UV project material). OCIO-related changes are marked OCIO_TODO as in some other files modified in revision 50628.
This commit is contained in:
@@ -351,12 +351,12 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
|
||||
CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
|
||||
GetParent()->SetProperty(m_targetprop, newstringprop);
|
||||
newstringprop->Release();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* append */
|
||||
char pchar = ToCharacter(keyIndex, IsShifted());
|
||||
STR_String newprop = tprop->GetText() + pchar;
|
||||
CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
|
||||
CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
|
||||
GetParent()->SetProperty(m_targetprop, newstringprop);
|
||||
newstringprop->Release();
|
||||
}
|
||||
@@ -365,7 +365,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
|
||||
/* Make a new property. Deletes can be ignored. */
|
||||
char pchar = ToCharacter(keyIndex, IsShifted());
|
||||
STR_String newprop = pchar;
|
||||
CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
|
||||
CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);
|
||||
GetParent()->SetProperty(m_targetprop, newstringprop);
|
||||
newstringprop->Release();
|
||||
}
|
||||
@@ -376,7 +376,7 @@ void SCA_KeyboardSensor::AddToTargetProp(int keyIndex)
|
||||
|
||||
/**
|
||||
* Tests whether shift is pressed
|
||||
*/
|
||||
*/
|
||||
bool SCA_KeyboardSensor::IsShifted(void)
|
||||
{
|
||||
SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)m_eventmgr)->GetInputDevice();
|
||||
@@ -391,9 +391,10 @@ bool SCA_KeyboardSensor::IsShifted(void)
|
||||
== SCA_InputEvent::KX_JUSTACTIVATED)
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SCA_KeyboardSensor::LogKeystrokes(void)
|
||||
@@ -494,25 +495,25 @@ PyAttributeDef SCA_KeyboardSensor::Attributes[] = {
|
||||
};
|
||||
|
||||
|
||||
PyObject* SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
PyObject *SCA_KeyboardSensor::pyattr_get_events(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
{
|
||||
SCA_KeyboardSensor* self= static_cast<SCA_KeyboardSensor*>(self_v);
|
||||
|
||||
SCA_IInputDevice* inputdev = ((SCA_KeyboardManager *)self->m_eventmgr)->GetInputDevice();
|
||||
|
||||
PyObject* resultlist = PyList_New(0);
|
||||
PyObject *resultlist = PyList_New(0);
|
||||
|
||||
for (int i=SCA_IInputDevice::KX_BEGINKEY ; i<= SCA_IInputDevice::KX_ENDKEY;i++)
|
||||
{
|
||||
const SCA_InputEvent & inevent = inputdev->GetEventValue((SCA_IInputDevice::KX_EnumInputs) i);
|
||||
if (inevent.m_status != SCA_InputEvent::KX_NO_INPUTSTATUS)
|
||||
{
|
||||
PyObject* keypair = PyList_New(2);
|
||||
PyObject *keypair = PyList_New(2);
|
||||
PyList_SET_ITEM(keypair,0,PyLong_FromSsize_t(i));
|
||||
PyList_SET_ITEM(keypair,1,PyLong_FromSsize_t(inevent.m_status));
|
||||
PyList_Append(resultlist,keypair);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultlist;
|
||||
}
|
||||
|
||||
@@ -655,7 +656,7 @@ bool IsPrintable(int keyIndex)
|
||||
|
||||
/**
|
||||
* Tests whether this is a delete key.
|
||||
*/
|
||||
*/
|
||||
bool IsDelete(int keyIndex)
|
||||
{
|
||||
if ( (keyIndex == SCA_IInputDevice::KX_DELKEY)
|
||||
|
||||
Reference in New Issue
Block a user