to create a conform cloth with script?

YudinEdYudinEd Posts: 90

Interesting, is it  possible to create conform garment using a script?

I understand 

1) to load character  

App.getContentMgr().openNativeFile( DUFname, true );     

2) to  open ready clothing as OBJ

App.getContentMgr().openFile( OBJname, true );     

4) Is there now  any way ( function or  script code) to create conform clothing?

????   :)

I forgot - to do OBJ as figure before this. I don't know how too. :(

Post edited by YudinEd on

Comments

  • EsemwyEsemwy Posts: 578

    So, what you want to do is launch and drive the "Transfer Utility" from within a script? If it's possible, perhaps it would be a DzAction, but that's just a guess. I'm a bit curious myself now.

  • YudinEdYudinEd Posts: 90

    I think  this variant "drive theTransfer Utility from within a script" is good  for me too.
    I try to seach suitable DzAction. 

    In any case, there is still other problem - to make  figure from ob j(prop). Other DzAction?

  • YudinEdYudinEd Posts: 90
    edited July 2016

    OK :)

    Select our obj by label and create figure from this obj. What need to do farther?

    var item = Scene.findNodeByLabel( "My Obj" );

    item.select( true );

    var mgr = MainWindow.getActionMgr();

    func = mgr.findAction( "DzJEConvertPropToFigureAction" )

    if( !func )

    {

    return;

    }

    func.trigger();

     

    Just in case Node Rename Action code (DAZ Sudio dialog). Choose by label and change node name and  label for an obj or a figure.

    var item = Scene.findNodeByLabel( "My Obj" );

    item.select( true );

    var mgr = MainWindow.getActionMgr();

    func = mgr.findAction( "DzJERenameNodeAction" )

    if( !func )

    {

    return;

    }

    func.trigger();

     

    Post edited by YudinEd on
  • Richard HaseltineRichard Haseltine Posts: 100,933

    You would need to be able to set the Transfer Utility options via script too, I don't know if that is possible. Converting a prop to a single-bone figure is not at all the same as using the Transfer Utility to create a new figure with bones that match the source figure.

  • YudinEdYudinEd Posts: 90
    edited July 2016

    Call "Figure Setup" pane

    var mgr = MainWindow.getActionMgr();

    func = mgr.findAction( "DzFigureSetupPaneAction" )

    if( !func )

    {

    return;

    }

    func.trigger();

     

    Post edited by YudinEd on
  • YudinEdYudinEd Posts: 90
    edited July 2016

    You would need to be able to set the Transfer Utility options via script too, I don't know if that is possible. Converting a prop to a single-bone figure is not at all the same as using the Transfer Utility to create a new figure with bones that match the source figure.

    Sorry, I don't notice :).  I used Figure Setup.

    How I can rename node label without dialog?

     

    Post edited by YudinEd on
  • Richard HaseltineRichard Haseltine Posts: 100,933
    edited July 2016

    If the node is stored in oNode,

    oNode.setName( "NewName" );

    Be aware of the possible consequences of chnaging a node's name.

    Post edited by Richard Haseltine on
  • YudinEdYudinEd Posts: 90
    Thanks
  • YudinEdYudinEd Posts: 90
    edited July 2016

    oNode.setName( "NewName" );

    I tried to search oNode by label  :) I'm confused - how to search oNode?

    If I could paste the parameters in the "Fifure Setup"panel window and execute , it will be fine.

    Have we such possibility in a script?

    Post edited by YudinEd on
  • Richard HaseltineRichard Haseltine Posts: 100,933

    Use the global Scene object:

    var oNode = Scene.findNodeByLabel( "label" );

    then check for validity and modify it.

    I am not aware that the functions of the Transfer Utility are exposed to scripting, either via the dialogue or as methods on exisiting objects, but that doesn't necessarily mean they aren't.

  • YudinEdYudinEd Posts: 90
    edited July 2016

    Thanks again. Otherwise I would have wrote the code on half a page. non-workinglaugh

    Post edited by YudinEd on
Sign In or Register to comment.