svn merge ^/trunk/blender -r49186:49190

This commit is contained in:
Campbell Barton
2012-07-25 09:06:44 +00:00
3 changed files with 21 additions and 2 deletions

View File

@@ -254,7 +254,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
break;
case UI_ID_OPEN:
case UI_ID_ADD_NEW:
/* these call uiIDContextPropertySet */
/* these call uiIDContextProperty */
break;
case UI_ID_DELETE:
memset(&idptr, 0, sizeof(idptr));

View File

@@ -902,6 +902,25 @@ static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
ima = tex->ima;
}
if (ima == NULL) {
PointerRNA ptr;
PropertyRNA *prop;
/* hook into UI */
uiIDContextProperty(C, &ptr, &prop);
if (prop) {
PointerRNA oldptr;
oldptr = RNA_property_pointer_get(&ptr, prop);
ima = (Image *)oldptr.id.data;
/* unlikely but better avoid strange crash */
if (ima && GS(ima->id.name) != ID_IM) {
ima = NULL;
}
}
}
if (ima)
path = ima->name;

View File

@@ -339,7 +339,7 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
}
}
return m_flag & ACT_FLAG_ATTEMPT_PLAY;
return m_flag & ACT_FLAG_ACTIVE;
}
#ifdef WITH_PYTHON