RV 4.2.0
Custom python plugin based on rv.rvtypes.MinorMode, has custom c++ library with python interface.
I wat to run a few native RV commands in my plugin`s method:
def reload_session(self, event=None):
if event:
event.reject()
print 'Yo!'
rv.commands.clearSession()
rv.commands.addSource('/my_dir/my.mov')
Variant 1:
I`ve made RV main menu item in my python plugin init. Works great if I simply push that drop down main menu item.
Variant 2:
But menu item is not enough, my plugin has gui which generates in C++ library (works great), and I`ve created the button in my gui to run the same "reload_session" method.
Subvariant A:
I got PyObject* pointer to my plugin in my C++ library, and easily read attributes from plugin, like this: PyObject_GetAttrString(m_plug, "pid"). Works great so far. But if I try to call method ( PyObject_CallMethod(m_plug, "reload_session", "()") ), SEGMENTATION FAULT error. WHY???
Subvariant B:
In c++ I create the button, found "reload session" QAction* in QApplication*, and my button runs QAction`s trigger: qactReloadSession->trigger(). I see in the log how I call the trigger, but it does not start "reload_session" method of my plugin. WHY???
Thank you