Ejemplo n.º 1
0
 def __init__(self, exporter):
     Config.__init__(self)
     self.useTexFolder =     exporter.useTexFolder.selected
     self.scale,self.unit =  exporter.taskview.getScale()
     self.useRelPaths =      True
     self.helpers =          True
     self.encoding =         exporter.taskview.getEncoding()
     
     self.useMasks =         exporter.masks.selected
     self.expressions =      exporter.expressions.selected
     self.facepanel =        exporter.facepanel.selected
     self.bodyShapes =       exporter.bodyShapes.selected
     self.useCustomShapes =  exporter.useCustomShapes.selected
     self.cage =             exporter.cage.selected
     self.feetOnGround =     exporter.feetOnGround.selected
     self.advancedSpine =    exporter.advancedSpine.selected
     self.maleRig =          exporter.maleRig.selected
     self.clothesRig =       exporter.clothesRig.selected
     self.rigtype =          exporter.getRigType()
     # MHX export does not support exporting without rig
     # If no rig selected (from library): default to MHX rig
     if not self.rigtype:
         self.rigtype = "mhx"
     
     # Used by mhx exporter
     self.customShapeFiles = []        
     self.customPrefix = "Mhc"
Ejemplo n.º 2
0
    def __init__(self, exporter):
        from armature.options import ArmatureOptions

        Config.__init__(self)
        self.selectedOptions(exporter)

        self.useRelPaths = True
        self.useNormals = True

        self.expressions = False
        #self.expressions = exporter.expressions.selected
        self.useCustomTargets = False
        #self.useCustomTargets = exporter.useCustomTargets.selected
        self.useTPose = False
        #self.useTPose = exporter.useTPose.selected

        self.yUpFaceZ = exporter.yUpFaceZ.selected
        self.yUpFaceX = exporter.yUpFaceX.selected
        self.zUpFaceNegY = exporter.zUpFaceNegY.selected
        self.zUpFaceX = exporter.zUpFaceX.selected

        self.localY = True  # exporter.localY.selected
        self.localX = False  # exporter.localX.selected
        self.localG = False  # exporter.localG.selected

        self.rigOptions = exporter.getRigOptions()
        if not self.rigOptions:
            return
            self.rigOptions = ArmatureOptions()
        self.rigOptions.setExportOptions(
            useExpressions = self.expressions,
            useTPose = self.useTPose,
        )
Ejemplo n.º 3
0
    def __init__(self, exporter):
        Config.__init__(self)
        self.useTexFolder = exporter.useTexFolder.selected
        self.scale, self.unit = exporter.taskview.getScale()
        self.useRelPaths = True
        self.helpers = True
        self.encoding = exporter.taskview.getEncoding()

        self.useMasks = exporter.masks.selected
        self.expressions = exporter.expressions.selected
        self.facepanel = exporter.facepanel.selected
        self.bodyShapes = exporter.bodyShapes.selected
        self.useCustomShapes = exporter.useCustomShapes.selected
        self.cage = exporter.cage.selected
        self.feetOnGround = exporter.feetOnGround.selected
        self.advancedSpine = exporter.advancedSpine.selected
        self.maleRig = exporter.maleRig.selected
        self.clothesRig = exporter.clothesRig.selected
        self.rigtype = exporter.getRigType()
        # MHX export does not support exporting without rig
        # If no rig selected (from library): default to MHX rig
        if not self.rigtype:
            self.rigtype = "mhx"

        # Used by mhx exporter
        self.customShapeFiles = []
        self.customPrefix = "Mhc"
Ejemplo n.º 4
0
    def __init__(self, exporter):
        from armature.options import ArmatureOptions

        Config.__init__(self)
        self.selectedOptions(exporter)

        self.useRelPaths = False
        self.expressions = False  #exporter.expressions.selected
        self.useCustomTargets = False  #exporter.useCustomTargets.selected
        self.useMaterials = True  # for debugging

        # Used by Collada, needed for armature access
        self.useTPose = False

        self.yUpFaceZ = True
        self.yUpFaceX = False
        self.zUpFaceNegY = False
        self.zUpFaceX = False

        self.localY = True
        self.localX = False
        self.localG = False

        self.rigOptions = exporter.getRigOptions()
        if not self.rigOptions:
            return
        self.rigOptions.setExportOptions(
            useExpressions=self.expressions,
            useTPose=self.useTPose,
            useLeftRight=False,
        )
Ejemplo n.º 5
0
 def __init__(self, exporter):
     Config.__init__(self)
     self.selectedOptions(exporter)
     
     self.useRelPaths     = False
     self.rigtype = exporter.getRigType()
     # FBX export does not support exporting without rig
     # If no rig selected (from library): default to soft1 rig
     if not self.rigtype:
         self.rigtype = "soft1"
     self.expressions     = exporter.expressions.selected
     self.useCustomShapes = exporter.useCustomShapes.selected
Ejemplo n.º 6
0
    def __init__(self):
        Config.__init__(self)
        self.scale,self.unit =      (1, "decimeter")
        self.useRelPaths =          True
        self.useAdvancedMHX =       False
        self.useRigify =            False
        self.useRotationLimits =    False

        self.feetOnGround =         True
        self.useFaceRig =           False
        self.expressions =          False
        self.useCustomTargets =     False
Ejemplo n.º 7
0
    def __init__(self):
        Config.__init__(self)
        self.scale,self.unit =      (1, "decimeter")
        self.useRelPaths =          True
        self.useAdvancedMHX =       False
        self.useRigify =            False
        self.useRotationLimits =    False

        self.feetOnGround =         True
        self.useFaceRig =           False
        self.expressions =          False
        self.useCustomTargets =     False
Ejemplo n.º 8
0
    def __init__(self, exporter):
        Config.__init__(self)
        self.selectedOptions(exporter)

        self.useRelPaths = True
        self.rigtype = exporter.getRigType()
        # Collada exporter does not support exporting without rig, so default
        # to soft1 rig when no rig specified in the skeleton library
        if not self.rigtype:
            self.rigtype = "soft1"
        self.useNormals = exporter.useNormals.selected
        self.rotate90X = exporter.rotate90X.selected
        self.rotate90Z = exporter.rotate90Z.selected
        self.expressions = exporter.expressions.selected
        self.useCustomShapes = exporter.useCustomShapes.selected
Ejemplo n.º 9
0
 def __init__(self, exporter):
     Config.__init__(self)
     self.selectedOptions(exporter)
     
     self.useRelPaths = True
     self.rigtype =   exporter.getRigType()
     # Collada exporter does not support exporting without rig, so default
     # to soft1 rig when no rig specified in the skeleton library
     if not self.rigtype:
         self.rigtype = "soft1"
     self.useNormals = exporter.useNormals.selected
     self.rotate90X = exporter.rotate90X.selected
     self.rotate90Z = exporter.rotate90Z.selected
     self.expressions     = exporter.expressions.selected
     self.useCustomShapes = exporter.useCustomShapes.selected
Ejemplo n.º 10
0
def createPoseRig(human, rigtype):
    config = Config()
    config.feetOnGround = False
    config.rigtype = rigtype
    config.setHuman(human)

    fp = None
    amt = CPoseArmature(human, config)

    for (bname, roll, parent, flags, layers, bbone) in amt.boneDefs:
        bone = CBone(amt, bname, roll, parent, flags, layers, bbone)
        amt.boneList.append(bone)        
        amt.bones[bname] = bone
    
    amt.build()   
    #amt.checkDirty()
    return amt
Ejemplo n.º 11
0
    def __init__(self):
        from armature.options import ArmatureOptions

        Config.__init__(self)

        #Les 3 suivants dependent de l'export habituel, a corriger
        self.useTPose = False
        self.feetOnGround = True
        self.scale = 1.0
        self.unit = "dm"

        self.useRelPaths = False
        self.useNormals = True

        self.expressions = False
        self.useCustomTargets = False
        self.useTPose = False

        #Depend encore de l'export habituel, valeur a recuperer par defaut
        self.yUpFaceZ = False
        self.yUpFaceX = False
        self.zUpFaceNegY = True
        self.zUpFaceX = False

        self.localY = True  # exporter.localY.selected
        self.localX = False  # exporter.localX.selected
        self.localG = False  # exporter.localG.selected

        if not hasattr(G.app.selectedHuman, "getSkeleton"):
            self.rigOptions = None
        else:
            skel = G.app.selectedHuman.getSkeleton()
            if skel:
                self.rigOptions = skel.options
            else:
                self.rigOptions = None

        if not self.rigOptions:
            return
            self.rigOptions = ArmatureOptions()

        self.rigOptions.setExportOptions(
            useExpressions=self.expressions,
            useTPose=self.useTPose,
        )
Ejemplo n.º 12
0
    def __init__(self):

        Config.__init__(self)

        self.useRelPaths = True
        self.useNormals = True

        self.expressions = False
        self.useCustomTargets = False
        self.useTPose = False

        self.yUpFaceZ = True
        self.yUpFaceX = False
        self.zUpFaceNegY = False
        self.zUpFaceX = False

        self.localY = True
        self.localX = False
        self.localG = False
Ejemplo n.º 13
0
    def __init__(self):

        Config.__init__(self)

        self.useRelPaths = True
        self.useNormals = True

        self.expressions = False
        self.useCustomTargets = False
        self.useTPose = False

        self.yUpFaceZ = True
        self.yUpFaceX = False
        self.zUpFaceNegY = False
        self.zUpFaceX = False

        self.localY = True
        self.localX = False
        self.localG = False
Ejemplo n.º 14
0
    def __init__(self):
        Config.__init__(self)

        self.useRelPaths = False
        self.expressions = False  #exporter.expressions.selected
        self.useCustomTargets = False  #exporter.useCustomTargets.selected
        self.useMaterials = True  # for debugging

        # Used by Collada, needed for armature access
        self.useTPose = False

        self.yUpFaceZ = True
        self.yUpFaceX = False
        self.zUpFaceNegY = False
        self.zUpFaceX = False

        self.localY = True
        self.localX = False
        self.localG = False
Ejemplo n.º 15
0
    def __init__(self):
        Config.__init__(self)

        from armature.options import ArmatureOptions

        self.useRelPaths     = False
        self.expressions = False    #exporter.expressions.selected
        self.useCustomTargets = False   #exporter.useCustomTargets.selected
        self.useMaterials    = True # for debugging

        # Used by Collada, needed for armature access
        self.useTPose = False

        self.yUpFaceZ = True
        self.yUpFaceX = False
        self.zUpFaceNegY = False
        self.zUpFaceX = False

        self.localY = True
        self.localX = False
        self.localG = False
Ejemplo n.º 16
0
    def __init__(self, exporter):
        from armature.options import ArmatureOptions

        Config.__init__(self)
        self.selectedOptions(exporter)

        self.useRelPaths     = False
        self.feetOnGround = False
        self.expressions = exporter.expressions.selected
        self.useCustomTargets = exporter.useCustomTargets.selected
        self.useMaterials    = True # for debugging

        self.rigOptions = exporter.getRigOptions()
        if not self.rigOptions:
            self.rigOptions = ArmatureOptions()
        self.rigOptions.setExportOptions(
            useExpressions = self.expressions,
            feetOnGround = self.feetOnGround,
            useTPose = self.useTPose,
            useLeftRight = False,
        )
Ejemplo n.º 17
0
    def __init__(self, exporter):
        from armature.options import ArmatureOptions

        Config.__init__(self)
        self.selectedOptions(exporter)

        self.useRelPaths = True
        self.useNormals = exporter.useNormals.selected
        self.rotate90X = exporter.rotate90X.selected
        self.rotate90Z = exporter.rotate90Z.selected
        self.feetOnGround = False
        self.expressions     = exporter.expressions.selected
        self.useCustomTargets = exporter.useCustomTargets.selected

        self.rigOptions = exporter.getRigOptions()
        if not self.rigOptions:
            self.rigOptions = ArmatureOptions()
        self.rigOptions.setExportOptions(
            useExpressions = self.expressions,
            feetOnGround = self.feetOnGround,
            useTPose = self.useTPose,
        )
Ejemplo n.º 18
0
def createPoseRig(human, rigtype):
    config = Config()
    config.feetOnGround = False
    config.rigtype = rigtype
    config.setHuman(human)

    fp = None
    amt = CPoseArmature(human, config)

    for (bname, roll, parent, flags, layers, bbone) in amt.boneDefs:
        bone = CBone(amt, bname, roll, parent, flags, layers, bbone)
        amt.boneList.append(bone)
        amt.bones[bname] = bone

    amt.build()
    #amt.checkDirty()
    return amt
Ejemplo n.º 19
0
 def __init__(self, exporter):
     Config.__init__(self)
     self.selectedOptions(exporter)
     self.useRelPaths = True
Ejemplo n.º 20
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
Ejemplo n.º 21
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
     self.feetOnGround = True
Ejemplo n.º 22
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
     self.exportShaders = False  # TODO add support for this
Ejemplo n.º 23
0
 def __init__(self):
     ExportConfig.__init__(self)
     self.useBinary     = False
Ejemplo n.º 24
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
Ejemplo n.º 25
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
     self.useNormals = False
Ejemplo n.º 26
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
     self.exportShaders = False  # TODO add support for this
Ejemplo n.º 27
0
 def __init__(self, exporter):
     Config.__init__(self)
     self.selectedOptions(exporter)
     self.useRelPaths = True
Ejemplo n.º 28
0
 def __init__(self):
     Config.__init__(self)
     self.useRelPaths = True
     self.feetOnGround = True