fix shaderless crash

This commit is contained in:
David Rose 2003-03-13 01:26:49 +00:00
parent 2623dabc13
commit a9c233b5c3
2 changed files with 4 additions and 1 deletions

View File

@ -1312,7 +1312,7 @@ make_polyset(const MDagPath &dag_path, const MFnMesh &mesh,
vert.set_normal(LVector3d(n[0], n[1], n[2]));
}
if (shader->has_projection()) {
if (shader != (MayaShader *)NULL && shader->has_projection()) {
// If the shader has a projection, use it instead of the
// polygon's built-in UV's.
vert.set_uv(shader->project_uv(p3d));

View File

@ -93,9 +93,12 @@ doIt(const MArgList &) {
framework.get_models().instance_to(window->get_render());
if (!convert(framework.get_models())) {
cerr << "failure in conversion.\n";
return MS::kFailure;
}
cerr << "successfully converted.\n";
loading_np.remove_node();
window->center_trackball(framework.get_models());
window->loop_animations();