On 12/04/2013 at 10:27, xxxxxxxx wrote:
Hi Yannick,
Basicaly, what I do is creating a Plug-in that will create a menu based on information given when c4d starts. those menus will be linked to apps that are supposed to be working with several softwares (maya, nuke, photoshop...)
the thing is that the majority of those apps runs with PySide and opens QtGui.QWidget.
now what I (try to) do is to link those QWidgets to the main c4d window because if I don't, I get an R6025 runtime error...
here is the part of the code from the maya Plug-in that I'm trying to reproduce, if it can help you see what I'm trying to do:
def show_dialog(self, title, bundle, widget_class, *args, **kwargs) :
_
_
_ import maya.OpenMayaUI as OpenMayaUI_
_ from PySide import QtCore, QtGui_
_ import shiboken_
_ _
_ # first construct the widget object _
_ obj = widget_class(*args, **kwargs)_
_
_
_ # now create a dialog to put it inside_
_ ptr = OpenMayaUI.MQtUtil.mainWindow()_
_ parent = shiboken.wrapInstance(long(ptr), QtGui.QMainWindow)_
_ self.log_debug("Parenting dialog to main window %08x %s" % (ptr, parent))_
_ dialog = myqdialog.MyQDialog(title, bundle, obj, parent)_
so what I'd like to make is the ptr = OpenMayaUI.MQtUtil.mainWindow() part.
Hi Nicklas, first of all, thanks for the bad news ^^
I tried to compile the c4d API thanks to what I found in the CINEMA 4D R13\resource\_api_lib folder.
the problem is I can only make a static library. I tried to modify the properties to make a dll instead, but so far, I only get errors during compiling. And I'm beginning to wonder if it is even possible to create a dll ^^'
Ekibyo