Open kenculate opened 5 years ago
+1
cmake_minimum_required(VERSION 2.8) include($ENV{DEVKIT_LOCATION}/cmake/pluginEntry.cmake) include_directories( ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/eigen ) set(PROJECT_NAME Cmd_DefTransf) set(SOURCE_FILES ${PROJECT_SOURCE_DIR}/src/Cmd_DefTransf.cpp ${PROJECT_SOURCE_DIR}/src/DeformationTransferManager.cpp ${PROJECT_SOURCE_DIR}/src/DeformationTransferManager.h ) set(LIBRARIES OpenMaya OpenMayaAnim Foundation ) build_plugin()
import maya.cmds as cmds import maya.mel as mel class TransferUI: def init(self): self.sources = [] self.targets = [] self.ui()
def ui(self):
self.window_name = "transferui"
if cmds.window(self.window_name, ex=1):
cmds.deleteUI(self.window_name)
self.window = cmds.window(self.window_name)
cmds.columnLayout(adj=1)
#row = cmds.rowLayout(nc=2)
cmds.separator(h=10)
cmds.button(l='Add Sources', c=self.add_sources)
self.list_src = cmds.textScrollList()
#cmds.setParent('..')
cmds.separator(h=10)
cmds.button(l='Add Targets', c=self.add_targets)
self.list_tgt = cmds.textScrollList()
cmds.separator(h=10)
cmds.button(l='Transfer', c=self.transfer)
cmds.showWindow(self.window)
def add_sources(self, *args):
sl = cmds.ls(sl=1)
cmds.textScrollList(self.list_src, e=1, a=sl)
self.sources += sl
def add_targets(self, *args):
sl = cmds.ls(sl=1)
cmds.textScrollList(self.list_tgt, e=1, a=sl)
self.targets += sl
def transfer(self, *args):
src = ','.join(self.sources)
tgt = ','.join(self.targets)
mel.eval('defTransfer -src "{}" -tgt "{}";'.format(src ,tgt))
TransferUI()
@kenculate thanks a lot. A question, how is the workflow with different vertex count or not vertex wise correspondence? the page is addressing it with a non-rigid-registration....is that already included?
It is not working as expected, for example I couldn’t find the proper implementation of markers in the source code.
@kenculate, did you used mesh with vertex wise correspondence?
@kenculate, thank you i found it out.....
the method requirespoint-wise correspondences between source and target shapes. Localshape deformation is then represented using deformation gradients,which are transferred from the source to the target shapes.
@kenculate do you have the ".mll" file?
yap, I will upload somewhere.
@kenculate thank you
@kenculate thanks a lot but i am not authorized to download this file....
@kenculate agha merci
moteasefane natunestam contacti az shoma peida konam, ye dusti dare talash mikone ye hamchin kari ro anjam bede va hamchenan movafagh nabude, age momkene contactetun ro baraye man beferestin ta baham connectetun konam shayad be rah hal moshtarak beresin!
this need some instruction or cmakelist file to build, please provide some.