mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-06 12:51:57 +02:00
[core] Remove of saving PushButton behavior
This commit is contained in:
parent
55c657dc1d
commit
862c5506a9
2 changed files with 1 additions and 18 deletions
|
@ -6,7 +6,6 @@ import re
|
|||
import weakref
|
||||
import types
|
||||
import logging
|
||||
import inspect
|
||||
|
||||
from collections.abc import Iterable, Sequence
|
||||
from string import Template
|
||||
|
@ -429,14 +428,6 @@ class PushButtonParam(Attribute):
|
|||
def __init__(self, node, attributeDesc, isOutput, root=None, parent=None):
|
||||
super(PushButtonParam, self).__init__(node, attributeDesc, isOutput, root, parent)
|
||||
|
||||
def getExportValue(self):
|
||||
""" Return the function defined of the PushButtonParam """
|
||||
paramName = self.name[:1].upper() + self.name[1:]
|
||||
methodName = f'on{paramName}Clicked'
|
||||
if hasattr(self.node.nodeDesc, methodName):
|
||||
return inspect.getsource(getattr(self.node.nodeDesc, methodName))
|
||||
return f'def {methodName}:\n pass'
|
||||
|
||||
@Slot()
|
||||
def clicked(self):
|
||||
self.node.onAttributeClicked(self)
|
||||
|
|
|
@ -14,7 +14,6 @@ import types
|
|||
import uuid
|
||||
from collections import defaultdict, namedtuple
|
||||
from enum import Enum
|
||||
import inspect
|
||||
|
||||
import meshroom
|
||||
from meshroom.common import Signal, Variant, Property, BaseObject, Slot, ListModel, DictModel
|
||||
|
@ -1686,7 +1685,7 @@ def nodeFactory(nodeDict, name=None, template=False, uidConflict=False):
|
|||
# do not perform that check for internal attributes because there is no point in
|
||||
# raising compatibility issues if their number differs: in that case, it is only useful
|
||||
# if some internal attributes do not exist or are invalid
|
||||
if not template and (sorted([attr.name for attr in nodeDesc.inputs]) != sorted(inputs.keys()) or \
|
||||
if not template and (sorted([attr.name for attr in nodeDesc.inputs if not isinstance(attr, desc.PushButtonParam)]) != sorted(inputs.keys()) or \
|
||||
sorted([attr.name for attr in nodeDesc.outputs]) != sorted(outputs.keys())):
|
||||
compatibilityIssue = CompatibilityIssue.DescriptionConflict
|
||||
|
||||
|
@ -1705,13 +1704,6 @@ def nodeFactory(nodeDict, name=None, template=False, uidConflict=False):
|
|||
|
||||
# verify that all inputs match their descriptions
|
||||
for attrName, value in inputs.items():
|
||||
paramName = attrName[:1].upper() + attrName[1:]
|
||||
functionName = f'on{paramName}Clicked'
|
||||
if hasattr(nodeDesc, functionName):
|
||||
m = inspect.getsource(getattr(nodeDesc, functionName))
|
||||
if value != m:
|
||||
compatibilityIssue = CompatibilityIssue.DescriptionConflict
|
||||
break
|
||||
if not CompatibilityNode.attributeDescFromName(nodeDesc.inputs, attrName, value):
|
||||
compatibilityIssue = CompatibilityIssue.DescriptionConflict
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue