#include <Python.h>
static void
ObjNode_setSelectable(const char *node_path, bool selectable)
{
if (!op_node)
throw HOM_OperationFailed("Internal error (could not find node)");
if (!obj_node)
throw HOM_OperationFailed("Internal error (node is not an object)");
throw HOM_PermissionError();
}
createHouException(
const char *exception_class_name, const char *instance_message,
{
exception_class = NULL;
PY_PyObject *hou_module_dict = PY_PyModule_GetDict(hou_module);
exception_class = PY_PyDict_GetItemString(
hou_module_dict, exception_class_name);
if (!exception_class)
{
PY_PyErr_SetString(
PY_PyExc_RuntimeError(),
"Could not find exception class in hou module");
return NULL;
}
return NULL;
return PY_PyObject_Call(exception_class,
args, NULL);
}
{
const char *node_path;
int selectable;
return NULL;
try
{
ObjNode_setSelectable(node_path, (bool)selectable);
}
{
if (exception_class_name.find("HOM_") == 0)
exception_class_name = exception_class_name.substr(4);
exception_class));
if (!exception_instance)
return NULL;
PY_PyErr_SetObject(exception_class, exception_instance);
return NULL;
}
}
#if defined(WIN32)
PyMODINIT_FUNC
#else
#endif
PyInit__hdk_sample_hom_extensions(void)
{
{
{"ObjNode_setSelectable", ObjNode_setSelectable_Wrapper,
PY_METH_VARARGS(), ""},
{ NULL, NULL, 0, NULL }
};
"_hdk_sample_hom_extensions", hom_extension_methods);
}
return reinterpret_cast<PyObject *>(module);
}