mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
fix shaderless crash
This commit is contained in:
parent
2623dabc13
commit
a9c233b5c3
@ -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));
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user