Fix T48366: Freestyle will unnecessary exclude some linked objects.

Group membership testing for including/excluding feature lines was not
accounting for object names possibly further qualified by library file
paths.

Also fixed a few potential (but unlikely) references of uninitialized
variables.

A big thank to Bastien Montagne for the insight on the cause of the
problem and how to fix it.
This commit is contained in:
2016-08-05 22:21:43 +09:00
parent bed32bf004
commit a2a7316d92
10 changed files with 82 additions and 3 deletions

View File

@@ -296,6 +296,19 @@ static PyObject *ViewShape_name_get(BPy_ViewShape *self, void *UNUSED(closure))
return PyUnicode_FromString(self->vs->getName());
}
PyDoc_STRVAR(ViewShape_library_path_doc,
"The library path of the ViewShape.\n"
"\n"
":type: str, or None if the ViewShape is not part of a library");
static PyObject *ViewShape_library_path_get(BPy_ViewShape *self, void *UNUSED(closure))
{
const char *name = self->vs->getLibraryPath();
if (!name)
Py_RETURN_NONE;
return PyUnicode_FromString(name);
}
PyDoc_STRVAR(ViewShape_id_doc,
"The Id of this ViewShape.\n"
"\n"
@@ -313,6 +326,7 @@ static PyGetSetDef BPy_ViewShape_getseters[] = {
(char *)ViewShape_vertices_doc, NULL},
{(char *)"edges", (getter)ViewShape_edges_get, (setter)ViewShape_edges_set, (char *)ViewShape_edges_doc, NULL},
{(char *)"name", (getter)ViewShape_name_get, (setter)NULL, (char *)ViewShape_name_doc, NULL},
{(char *)"library_path", (getter)ViewShape_library_path_get, (setter)NULL, (char *)ViewShape_library_path_doc, NULL},
{(char *)"id", (getter)ViewShape_id_get, (setter)NULL, (char *)ViewShape_id_doc, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};