Skip to content
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

Fix Pointer node #769

Merged
merged 1 commit into from May 22, 2022
Merged

Conversation

BeheadedKamikaze
Copy link
Contributor

@BeheadedKamikaze BeheadedKamikaze commented Apr 20, 2022

Fixes #770 Pointer node does not allow selecting a material, volume, or texture

The LUXCORE_MT_pointer_select_node_tree menu is calling poll_node from its @poll class method, and it seems to always return False because when it is called context has no attribute node. I don't know why this stopped working, or even if it ever did.

Returning False from poll causes the Pointer node to not show the drop-down menu at all, making it impossible to use the Pointer node at all.

image

To fix this, we can remove the poll method (same thing as always returning True, and instead check that the node is present in the draw method, before we try to use it.

image

@@ -163,7 +163,7 @@ def poll(cls, context):
NodeItem("LuxCoreNodeTexIrregularData", label="Irregular Data"),
]),

LuxCoreNodeCategoryMaterial("LUXCORE_MATERIAL_SHAPE", "Shape Modifiers", items=[
LuxCoreNodeCategoryMaterial("LUXCORE_MATERIAL_SHAPE", "Shape Modifiers", items=[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While investigating the issue I noticed the indentation on this line was incorrect. This is not critical to solving the issue, but I thought it would be good to fix it anyway.

@kintuX
Copy link

kintuX commented Apr 20, 2022

I'm also confirming issue solved. Thanks.

@Harvester62
Copy link

I'm also confirming this fix resolved the issue. Thanks.

@Dade916 Dade916 merged commit 20fc93b into LuxCoreRender:master May 22, 2022
@BeheadedKamikaze BeheadedKamikaze deleted the fix_pointer branch May 22, 2022 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pointer node does not allow selecting a material, volume, or texture
4 participants