Digital Art Zone

 
     
technical question to morph controllers and x/y/z translates of primitives
Posted: 24 May 2012 08:22 PM   [ Ignore ]
Power Member
Avatar
RankRankRank
Total Posts:  1466
Joined  2010-06-29

hello,

I have a question to morph controllers and x/y/z translates of primitives.

Is it possible to connect one of the translates of a primitive to a morph of a figure?


an example (really just an example just to show what I mean):

I have a bottle with morphs (wider,higher,deeper) and to fill the bottle I put a cylinder in it and parent the cylinder to the bottle.

I don`t scale the bottle via translates I use the morphs but the cylinder doesn`t change, so is it possible in some way to connect the translates of the cylinder (x/y/z) with the morphs of the bottle?

 Signature  Samples of my renders by cosmo


Every day is your day - not the day of other people - So live your life, not the lifes of others and enjoy it

Profile
 
 
Posted: 25 May 2012 05:52 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13639
Joined  2003-10-09

Yes, but you need to use a script to set it up.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 25 May 2012 03:11 PM   [ Ignore ]   [ # 2 ]
Power Member
Avatar
RankRankRank
Total Posts:  1466
Joined  2010-06-29
Richard Haseltine - 25 May 2012 05:52 AM

Yes, but you need to use a script to set it up.

okay, thanks first but…

I am programming at work sometimes but not in scripts and in a different programing language, so I have no clue what I have to program or how such a script should look like blank stare

 Signature  Samples of my renders by cosmo


Every day is your day - not the day of other people - So live your life, not the lifes of others and enjoy it

Profile
 
 
Posted: 25 May 2012 03:49 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13639
Joined  2003-10-09

This assumes you pass two nodes, first the one you want to have the ERC-controlled property, then the one you ant to be the controller, each followed by the name of the property that you want to use as a string. Then type is the name of the ERC type from DzERCLink (see script docs), multiplier and addend are the numbers that adjust the link.

function AddERCLink controlledNode controlledChannel 
                    
controlNode controlChannel type multiplier addend {
    
    
if ( controlNode && controlledNode {
 
// Get the master control
 
var masterProperty null;
 
masterProperty findMorphPropertycontrolNode controlChannel );
    
 
// Get the slave control
 
var slaveProperty null;
 
slaveProperty findMorphPropertycontrolledNode controlledChannel );
 
 if ( 
masterProperty && slaveProperty {
     
var ERCLink = new DzERCLinktype multiplier addend );
     if ( 
ERCLink {
  ERCLink
.setPropertymasterProperty );
  
slaveProperty.insertControllerERCLink );
     
}
 }
    }
 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 26 May 2012 03:28 AM   [ Ignore ]   [ # 4 ]
Power Member
Avatar
RankRankRank
Total Posts:  1466
Joined  2010-06-29
Richard Haseltine - 25 May 2012 03:49 PM

This assumes you pass two nodes, first the one you want to have the ERC-controlled property, then the one you ant to be the controller, each followed by the name of the property that you want to use as a string. Then type is the name of the ERC type from DzERCLink (see script docs), multiplier and addend are the numbers that adjust the link.

function AddERCLink controlledNode controlledChannel 
                    
controlNode controlChannel type multiplier addend {
    
    
if ( controlNode && controlledNode {
 
// Get the master control
 
var masterProperty null;
 
masterProperty findMorphPropertycontrolNode controlChannel );
    
 
// Get the slave control
 
var slaveProperty null;
 
slaveProperty findMorphPropertycontrolledNode controlledChannel );
 
 if ( 
masterProperty && slaveProperty {
     
var ERCLink = new DzERCLinktype multiplier addend );
     if ( 
ERCLink {
  ERCLink
.setPropertymasterProperty );
  
slaveProperty.insertControllerERCLink );
     
}
 }
    }

but I do need to have a software or software update/plug in or something like that, right? it is not possible to write a script with the standard daz studio 3 or studio 4 pro version, right?

 Signature  Samples of my renders by cosmo


Every day is your day - not the day of other people - So live your life, not the lifes of others and enjoy it

Profile
 
 
Posted: 26 May 2012 02:20 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13639
Joined  2003-10-09

Sorry, I tried replying earlier and the forum kept insisting I was logged out. If you are reading this it was more cooperative this time.

No, you don’t need a separate tool to write scripts - any text editor will do the job, though DS4.5 does have an integrated IDE again (and DS3 had an IDE and docs in the Scripting Development Kit).

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 26 May 2012 05:35 PM   [ Ignore ]   [ # 6 ]
Power Member
Avatar
RankRankRank
Total Posts:  1466
Joined  2010-06-29
Richard Haseltine - 26 May 2012 02:20 PM

Sorry, I tried replying earlier and the forum kept insisting I was logged out. If you are reading this it was more cooperative this time.

No, you don’t need a separate tool to write scripts - any text editor will do the job, though DS4.5 does have an integrated IDE again (and DS3 had an IDE and docs in the Scripting Development Kit).

no problem wink it is nothing that can`t wait smile

thanks for the help and I will try it and maybe I can get it work smile

 Signature  Samples of my renders by cosmo


Every day is your day - not the day of other people - So live your life, not the lifes of others and enjoy it

Profile