svn merge ^/trunk/blender -r49186:49190
authorCampbell Barton <ideasman42@gmail.com>
Wed, 25 Jul 2012 09:06:44 +0000 (09:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 25 Jul 2012 09:06:44 +0000 (09:06 +0000)
source/blender/editors/interface/interface_templates.c
source/blender/editors/space_image/image_ops.c
source/gameengine/Converter/BL_ActionActuator.cpp

index a87fc76d9d8e57733ef11a4873bfb6d5c53f2165..613d74e309b50d6c3c59435bfc175b9fd97e917e 100644 (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));
index 42af515983ab34d7b2d44fe0f498b7279c0bcddc..8885b30842b69510b12cc5ef2f3c1715baf4040a 100644 (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;
 
index cab6d0fc3760bc3cc3691f6c4262950922ce7146..0f33d88f82fcf53dbd8e1accfbd0f39cfd52108a 100644 (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