mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T89982: Geometry Nodes: 'New' Button tries to create node_tree on active modifier, rather than button context
When done from the Properties Editor, the context's modifier should be used (this is where the button is located), when done from elsewhere, the active modifier is still the way to go (since the context modifier is not available then) Maniphest Tasks: T89982 Differential Revision: https://developer.blender.org/D11972
This commit is contained in:
parent
00b135a379
commit
05ffe05ebc
1 changed files with 4 additions and 1 deletions
|
|
@ -81,7 +81,10 @@ class NewGeometryNodeTreeAssign(Operator):
|
|||
return geometry_modifier_poll(context)
|
||||
|
||||
def execute(self, context):
|
||||
modifier = context.object.modifiers.active
|
||||
if context.area.type == 'PROPERTIES':
|
||||
modifier = context.modifier
|
||||
else:
|
||||
modifier = context.object.modifiers.active
|
||||
|
||||
if not modifier:
|
||||
return {'CANCELLED'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue