-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
address conflict between visualization and VTK head #2612
address conflict between visualization and VTK head #2612
Conversation
appveyor appears to have timed out during the build process |
Hi, the lines that you are changing have quite a history, please refer to #2291, #2311, and #2322. As you can see, we have been bouncing between different version checks for a while. I would like to avoid a situation that we merge a commit that fixes the problem for you, but breaks builds for others. Please check especially the last thread that I referenced. We need to know a specific released VTK version where the API changed. |
Ubuntu 18.04 LTS #if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 2
mapper->MapDataArrayToMultiTextureAttribute(mesh.tex_materials[tex_id].tex_name.c_str(),
this_coordinates_name.c_str(),
vtkDataObject::FIELD_ASSOCIATION_POINTS);
#else
mapper->MapDataArrayToMultiTextureAttribute(tu,
this_coordinates_name.c_str (),
vtkDataObject::FIELD_ASSOCIATION_POINTS);
this_coordinates_name.c_str(),
vtkDataObject::FIELD_ASSOCIATION_POINTS);
#endif
polydata->GetPointData ()->AddArray (coordinates);
actor->GetProperty ()->SetTexture (tu, texture);
++tex_id;
} Maintainer edit: aesthetics |
the API changes mapper->MapDataArrayToMultiTextureAttribute to take a string, whereas SetTexture remains an integer. This prevents the approach given by the previous define from working. This was changed on VTK commit Kitware/VTK@bbc96ed 10 months ago. This change is encorporated into the upcoming release https://blog.kitware.com/vtk-8-2-0-rc1-ready-for-testing/ . The previous define would have never activated as VTK has not release a version 9, so this change is safe from breaking users with previous versions. |
Thanks for investigating. I just have a minor suggestion then, can we keep the #if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION > 8
const char *tu = mesh.tex_materials[tex_id].tex_name.c_str ();
#else
int tu = vtkProperty::VTK_TEXTURE_UNIT_0 + tex_id;
#endif |
Thanks I will look, let me a day
Le mar. 20 nov. 2018 à 09:21, Sergey Alexandrov <[email protected]>
a écrit :
… Thanks for investigating. I just have a minor suggestion then, can we keep
the #if/#else stuff at the same place as it is now, only update the
version check:
#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION > 8
const char *tu = mesh.tex_materials[tex_id].tex_name.c_str ();
#else
int tu = vtkProperty::VTK_TEXTURE_UNIT_0 + tex_id;
#endif
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2612 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGLaSWeOv401v4VmopvlHXY9wrfROno2ks5uw7uKgaJpZM4YYhzA>
.
|
@taketwo I agree that is more aesthetically pleasing and nicer to the commit history. However line 3570 requires int tu in all VTK versions
I hope that I am not coming off as a pedant, I have more contributions to make! |
Maybe I'm checking in the wrong place, but I see the following signature: void vtkProperty::SetTexture(const char* name, vtkTexture* tex) Edit: the commit you referred to earlier has decorated the |
@taketwo I concede that I was mistaken. I have pushed the requested change. This builds for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
Thanks everyone. Edit: I just noticed I merged again instead of squashing... |
error in vtk/rendering/core introduced by Kitware/VTK@bbc96ed
Closes #2623