예제 #1
0
def setAllMetadata():
    # print("Saving ALL metadata")
    for stream in storage.streams.keys():
        # print(stream, getattr(storage.values, stream))
        if storage.streams[stream] == "sanStringStruct":
            cmds.editMetadata(streamName=stream, channelName='mayaExporterReady', index=0,
                              stringValue=getattr(storage.values, stream),
                              scene=True)

        else:
            cmds.editMetadata(streamName=stream, channelName='mayaExporterReady', index=0,
                              value=getattr(storage.values, stream),
                              scene=True)
예제 #2
0
	def __setitem__(self, key, value):
		if not self._hasStruct():
			cmds.dataStructure(
					format='raw', 
					asString='name={}:string=cross3dValue'.format(self._structureName))
		# Note: Make sure the metadata channel exists
		cmds.addMetadata(
				structure=self._structureName, 
				streamName=self._cross3dStream, 
				channelName=self._channelName, 
				indexType=self._indexType, 
				scene=True)
		# Store the metadata
		cmds.editMetadata(
				streamName=self._cross3dStream, 
				memberName=self._memberName, 
				index=key, 
				stringValue=self.escapeValue(value), 
				scene=True)
		# Notify listening slots about the change
		self.emitChange()
예제 #3
0
def editMetadata(*args, **kwargs):
    res = cmds.editMetadata(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res
예제 #4
0
	def __delitem__(self, key):
		if not key in self:
			raise KeyError('{} is not stored in FileProps'.format(key))
		cmds.editMetadata(streamName=self._cross3dStream, index=key, scene=True, remove=True)
예제 #5
0
def setExportName():
    cmds.editMetadata(streamName='exportName', channelName='mayaExporterReady', index=0, stringValue=storage.values.exportName,
                      scene=True)
예제 #6
0
def setUnityRefDir():
    cmds.editMetadata(streamName='unityRefDir', channelName='mayaExporterReady', index=0,
                      stringValue=storage.values.unityRefDir,
                      scene=True)