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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion nodes/materials/tree.py
Expand Up @@ -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.

NodeItem("LuxCoreNodeShapeSubdiv", label="Subdivision"),
NodeItem("LuxCoreNodeShapeHeightDisplacement", label="Height Displacement"),
NodeItem("LuxCoreNodeShapeVectorDisplacement", label="Vector Displacement"),
Expand Down
7 changes: 3 additions & 4 deletions operators/pointer_node.py
Expand Up @@ -42,11 +42,10 @@ class LUXCORE_MT_pointer_select_node_tree(bpy.types.Menu, LUXCORE_MT_node_tree):
bl_idname = "LUXCORE_MT_pointer_select_node_tree"
bl_description = "Select a node tree"

@classmethod
def poll(cls, context):
return poll_node(context)

def draw(self, context):
if not hasattr(context, "node"):
# this shouldn't happen, because draw is only called when the menu is open
return
node = context.node
assert node.bl_idname == "LuxCoreNodeTreePointer"
self.custom_draw(node.filter, "luxcore.pointer_set_node_tree")
Expand Down