diff options
-rw-r--r-- | release/scripts/object_find.py | 14 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/release/scripts/object_find.py b/release/scripts/object_find.py index 8332eab84fb..f12af07e3e4 100644 --- a/release/scripts/object_find.py +++ b/release/scripts/object_find.py @@ -61,8 +61,20 @@ def get_object_images(ob): me.activeUVLayer = orig_uvlayer + + # Now get material images + for mat in me.materials: + if mat: + for mtex in mat.getTextures(): + if mtex: + tex = mtex.tex + i = tex.getImage() + if i: unique_images[i.name] = i + return unique_images.values() + + # Todo, support other object types, materials return [] @@ -118,7 +130,7 @@ def main(): def activate(ob, scn): bpy.data.scenes.active = scn scn.objects.selected = [] - scn.Layers = ob.Layers + scn.Layers = ob.Layers & (1<<20)-1 ob.sel = 1 def name_cmp(name_search, name_found): diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index fe6294e7626..eb0052d71ff 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -696,7 +696,7 @@ static PyObject* gPySetGLSLMaterialSetting(PyObject*, char *setting; int enable, flag; - if (PyArg_ParseTuple(args,"si",&setting,&enable)) + if (!PyArg_ParseTuple(args,"si",&setting,&enable)) return NULL; flag = getGLSLSettingFlag(setting); |