예제 #1
0
    def processOperator(self, comp: 'COMP'):
        self.log(f'Processing operator {comp}')
        self.context.focusInNetworkPane(comp)
        self.context.disableCloning(comp)
        self.context.detachTox(comp)
        tools = RaytkTools()
        tools.updateROPMetadata(comp)
        tools.updateROPParams(comp)
        self.context.applyParamUpdatersIn(comp)
        self.context.resetCustomPars(comp)
        self.context.lockROPPars(comp)

        # This really shouldn't be necessary but there's something strange with old cloned components...
        self.context.safeDestroyOp(comp.op('opDefinition/paramHelpEditor'))

        # self.context.moveNetworkPane(comp)
        self.processOperatorSubCompChildrenOf(comp)
        # self.context.moveNetworkPane(comp)
        if not comp.isPanel:
            comp.showCustomOnly = True
            self.log(f'Updating OP image for {comp}')
            img = tools.updateOPImage(comp)
            if img:
                # self.context.focusInNetworkPane(img)
                self.context.disableCloning(img)
                self.context.detachTox(img)
                self.context.lockBuildLockOps(img)
                self.context.cleanOpImage(img)
        comp.color = IconColors.defaultBgColor
        if self.docProcessor:
            self.docProcessor.processOp(comp)
예제 #2
0
 def Create(self):
     self._setMessageText('')
     category = self.ownerComp.op('category_dropmenu').par.Value0.eval()
     name = self.ownerComp.op('typeName_field').par.Value0.eval()
     try:
         rop = RaytkTools().createNewRopType(typeName=name,
                                             category=category)
     except Exception as err:
         self._setMessageText(str(err))
         return
     iop.ropEditor.LoadROP(rop)
     self.Close()
예제 #3
0
파일: ropEditor.py 프로젝트: t3kt/raytk
 def updateReturnTypeParMenu(self):
     RaytkTools().updateReturnTypeParMenu(self.ROPInfo)
     info = self.ROPInfo
예제 #4
0
파일: ropEditor.py 프로젝트: t3kt/raytk
 def updateContextTypeParMenu(self):
     RaytkTools().updateContextTypeParMenu(self.ROPInfo)
예제 #5
0
파일: ropEditor.py 프로젝트: t3kt/raytk
 def saveROP(self, incrementVersion: bool):
     info = self.ROPInfo
     if info:
         RaytkTools().saveROP(info.rop, incrementVersion)
예제 #6
0
파일: ropEditor.py 프로젝트: t3kt/raytk
 def reloadHelp(self):
     info = self.ROPInfo
     if info:
         RaytkTools().reloadHelp(info.rop)
예제 #7
0
파일: ropEditor.py 프로젝트: t3kt/raytk
 def setUpHelp(self):
     info = self.ROPInfo
     if info:
         RaytkTools().setUpHelp(info.rop)
예제 #8
0
파일: ropEditor.py 프로젝트: t3kt/raytk
 def onStatusDropMenuChange(self):
     info = self.ROPInfo
     if not info:
         return
     status = self._statusDropMenu.par.Value0.eval()
     RaytkTools().setROPStatus(info.rop, status)
예제 #9
0
파일: toolkitEditor.py 프로젝트: t3kt/raytk
 def saveAllROPSpecs():
     RaytkTools().saveAllROPSpecs()
예제 #10
0
 def generateSpec(self) -> Optional[str]:
     spec = RaytkTools().loadROPSpec_NEW(
         ipar.inspectorCore.Targetcomp.eval(), checkExists=False)
     if not spec:
         return None
     return yaml.dump(spec, default_style='', sort_keys=False)
예제 #11
0
파일: toolsExt.py 프로젝트: t3kt/raytk
 def updateAllROPToolkitVersions():
     RaytkTools().updateAllROPToolkitVersions()
예제 #12
0
파일: toolsExt.py 프로젝트: t3kt/raytk
 def organizeCategory(comp: 'COMP'):
     RaytkTools().organizeCategory(comp)