Digital Art Zone

 
   
2 of 3
2
setNodeOrigin?
Posted: 24 October 2012 05:56 PM   [ Ignore ]   [ # 16 ]
Active Member
RankRank
Total Posts:  819
Joined  2009-12-07

Hi mac

I’m going through the script now, reformatting and adding comments which will hopefully help you. However, it doesn’t run on my system, because a number of the variables are undefined (e.g. g_oGUI). Is this the whole script, or was there something at the top (e.g. include(X) that you left out?

Thanks

 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 24 October 2012 06:37 PM   [ Ignore ]   [ # 17 ]
Active Member
RankRank
Total Posts:  819
Joined  2009-12-07

Hi mac

I’ve gone through the script, reformatted to make it easier to read/understand and added comments to help. Haven’t changed any code, but I did add some comments marked *** where I thought the intent wasn’t clear.

/* All the g_oXXX objects e.g. g_oGui, are defined somewhere else in another script. 
This script is executed on the last line which is g_oGui.doDialog(). 
I assume that shows the dialog, then calls DsActions.prototype.begin when the user clicks Accept. */

/* Below defines a function "begin" without arguments, on the DSActions object. 
Generally, adding functions to a third party object (through DSActions.prototype) is frowned upon because it could 
lead to instability. This is ok if DsActions is your object, defined in this script */

DsActions.prototype.begin = function()
 
{
   
// Initialize variables
    
var bSelected false;
   var 
bRecurse false;
   var 
bRoot false;

   
// Check if nodes are selected in the GUI
   
if( g_oGui.getNodes() == g_sSELECTED )
      
bSelected true;

   
// Check if recursive is selected in the GUI
   
if( g_oGui.getPropagation() == g_sRECURSIVE )
      
bRecurse true;

   
// Check if root node is selected in the GUI
   
if( g_oGui.getNodes() == g_sROOT )
   
{
      bRoot 
true;
      
bSelected true;
   
}

   
// Transfer GUI checkboxes to preset helper
   
g_oPresetHelper.setDoMorphsg_oGui.morphsChecked() );
   
g_oPresetHelper.setLimitsg_oGui.limitsChecked() );
   
g_oPresetHelper.setTransformsg_oGui.transformsChecked() );
   
g_oPresetHelper.setXRotg_oGui.xRotChecked() );
   
g_oPresetHelper.setYRotg_oGui.yRotChecked() );
   
g_oPresetHelper.setZRotg_oGui.zRotChecked() );
   
g_oPresetHelper.setXPosg_oGui.xTranChecked() );
   
g_oPresetHelper.setYPosg_oGui.yTranChecked() );
   
g_oPresetHelper.setZPosg_oGui.zTranChecked() );
   
g_oPresetHelper.setGSclg_oGui.gScaleChecked() );
   
g_oPresetHelper.setXSclg_oGui.xScaleChecked() );
   
g_oPresetHelper.setYSclg_oGui.yScaleChecked() );
   
g_oPresetHelper.setZSclg_oGui.zScaleChecked() );

   
// Tell the user we're busy
   
setBusyCursor();
   
   
// Collect nodes (tell the function whether anything is selected, whether to recurse and whether the root node is selected)
   
this.m_aNodes g_oSceneHelper.collectNodesbSelectedbRecursebRoot );
 
   
// Set the undo checkpoint
   
beginUndo();
   
   
// Run through all the collected nodes and set the properties of each node using 
   // "DsActions.prototype.setProperties" function below
   
for( var 0this.m_aNodes.lengthi++ )
      
this.setPropertiesthis.m_aNodes[ i ].getSkeleton(), this.m_aNodes[ i ]bRecurse );
   
   
// Re-initialize variables
   
bSelected false;
   
bRoot false;
   
   
// Check if any surfaces are selected
   
if( g_oGui.getSurfaces() == g_sSELECTED )
   
{
      bSelected 
true;
      
bRoot true;
   
}
   
   
// *** Not sure why we're doing this here - if surfaces are selected above then bRoot is already true. 
   // Need to see what getSurfaces() does. ***
   
if( g_oGui.getSurfaces() == g_sALL )
      
bRoot true;
 
   
// Transfer "ignore maps" option from GUI to preset helper
   
if( g_oGui.getMapSettings() == g_sIGNORE_MAPS )
      
g_oPresetHelper.setMapSettingDzPresetHelper.Ignore );
   else
      
g_oPresetHelper.setMapSettingDzPresetHelper.Replace );
    
   
// Collect nodes (tell the function something is selected, to recurse and that the root node is selected) - 
   // I guess this forces collection of all nodes
   
this.m_aNodes g_oSceneHelper.collectNodestruetruetrue );
   
   
// Run through all the collected nodes and ..
   
for( var 0this.m_aNodes.lengthi++ )
   
{
      
// ... make a note of the current node
      
this.m_oNode this.m_aNodes[ i ];
      
      
// ... create a new materials container
      
this.m_aNewMaterials = new Array;
      
      
// ... collect materials for the current node (tell the function whether something is selected and 
      // whether the root node is selected)
      
g_oPresetHelper.collectMaterialsthis.m_oNodefalsebSelectedbRoot );
      
      
// ... make a note of the collected materials
      // *** Not sure why we're doing this step and the previous step this way - normally we'd call the function and 
      // store the result in a variable in 1 step. Need to see these two functions to know why ***
      
this.m_aMaterials g_oPresetHelper.getCollectedMaterials();
      
      
// ... make a note of the material shapes
      
this.m_aMaterialShapes g_oPresetHelper.getCollectedMaterialShapes();
      
      
// ... run through the collected materials for this node and set material properties using the 
      // DsActions.prototype.setMaterialProperties function below
      
for( var 0this.m_aMaterials.lengthj++ )
         
this.setMaterialPropertiesthis.m_aMaterials[ j ] );
   
}
 
   
// Add the script name to the undo list
   
acceptUndoString“\”%1\”” ).argg_sSCRIPT_NAME ) );
   
   
// Tell the user we're finished
   
clearBusyCursor();
}
 
/*********************************************************************/
DsActions.prototype.setMaterialProperties = function( oMaterialoShape )
{
   
// Make a note of the material and its name
   // *** sID should probably be called sMaterialName - that would be a more intuitive variable name ***
   
this.m_oElement oMaterial;
   var 
sID this.m_oElement.name;

   
// Check the material's name ...
   
switch( sID )
   
{
      
case “hinge”:
         
// ... initialize the material
         // *** Not sure what prepareMaterial does - might need to see this function ***
         
this.m_sMaterialType “DzDefaultMaterial”;
         
this.m_sMaterialName “DAZ Studio Default”;
         
this.prepareMaterial();
         
         
// ... set hinge material properties, i.e. make it look like a hinge
         
g_oPresetHelper.setTargetElementthis.m_oElement );
         
g_oPresetHelper.setColorProperty“Diffuse Color”,  [ 255255255 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Diffuse Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Glossiness”true01[ 1 ] );
         
g_oPresetHelper.setColorProperty“Specular Color”,  [ 000 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Specular Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericProperty“Multiply Specular Through Opacity”,  [ 0 ] );
         
g_oPresetHelper.setColorProperty“Ambient Color”,  [ 000 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Ambient Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Opacity Strength”true01[ 0 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Bump Strength”true02[ 0 ] );
         
g_oPresetHelper.setNumericProperty“Negative Bump”,  -0.01 ] );
         
g_oPresetHelper.setNumericProperty“Positive Bump”,  [ 0.01 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Displacement Strength”true02[ 0 ] );
         
g_oPresetHelper.setNumericProperty“Minimum Displacement”,  -0.1 ] );
         
g_oPresetHelper.setNumericProperty“Maximum Displacement”,  [ 0.1 ] );
         
g_oPresetHelper.setPropertyWithString“Normal Map”“” );
         
g_oPresetHelper.setColorProperty“Reflection Color”,  [ 255255255 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Reflection Strength”true01[ 0 ] );
         
g_oPresetHelper.setColorProperty“Refraction Color”,  [ 255255255 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Refraction Strength”true01[ 0 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Index of Refraction”true010[ 0 ] );
         
g_oPresetHelper.setNumericProperty“Horizontal Tiles”,  [ 1 ] );
         
g_oPresetHelper.setNumericProperty“Horizontal Offset”,  [ 0 ] );
         
g_oPresetHelper.setNumericProperty“Vertical Tiles”,  [ 1 ] );
         
g_oPresetHelper.setNumericProperty“Vertical Offset”,  [ 0 ] );
         
g_oPresetHelper.setNumericProperty“Lighting Model”,  [ 3 ] );
         
g_oPresetHelper.setNumericProperty“UV Set”,  [ 0 ] );
         
g_oPresetHelper.setNumericProperty“Smooth On”,  [ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Smooth Angle”true0180[ 89.9 ] );
      break;

      case 
“hinge_back”:
         
// ... initialize the material
         
this.m_sMaterialType “DzDefaultMaterial”;
         
this.m_sMaterialName “DAZ Studio Default”;
         
this.prepareMaterial();

         
// ... set hinge material properties, i.e. make it look like a hinge back
         
g_oPresetHelper.setTargetElementthis.m_oElement );
         
g_oPresetHelper.setColorProperty“Diffuse Color”,  [ 000 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Diffuse Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Glossiness”true01[ 0.6 ] );
         
g_oPresetHelper.setColorProperty“Specular Color”,  [ 255237178 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Specular Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericProperty“Multiply Specular Through Opacity”,  [ 1 ] );
         
g_oPresetHelper.setColorProperty“Ambient Color”,  [ 000 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Ambient Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Opacity Strength”true01[ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Bump Strength”true02[ 0 ] );
         
g_oPresetHelper.setNumericProperty“Negative Bump”,  -0.01 ] );
         
g_oPresetHelper.setNumericProperty“Positive Bump”,  [ 0.01 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Displacement Strength”true02[ 0 ] );
         
g_oPresetHelper.setNumericProperty“Minimum Displacement”,  -0.1 ] );
         
g_oPresetHelper.setNumericProperty“Maximum Displacement”,  [ 0.1 ] );
         
g_oPresetHelper.setPropertyWithString“Normal Map”“” );
         
g_oPresetHelper.setColorProperty“Reflection Color”,  [ 244216130 ],
          
/Runtime/textures/maclean/room creator/rc0chrome.jpg” );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Reflection Strength”true01[ 0.6 ] );
         
g_oPresetHelper.setColorProperty“Refraction Color”,  [ 255255255 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Refraction Strength”true01[ 0 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Index of Refraction”true010[ 0 ] );
         
g_oPresetHelper.setNumericProperty“Horizontal Tiles”,  [ 1 ] );
         
g_oPresetHelper.setNumericProperty“Horizontal Offset”,  [ 0 ] );
         
g_oPresetHelper.setNumericProperty“Vertical Tiles”,  [ 1 ] );
         
g_oPresetHelper.setNumericProperty“Vertical Offset”,  [ 0 ] );
         
g_oPresetHelper.setNumericProperty“Lighting Model”,  [ 3 ] );
         
g_oPresetHelper.setNumericProperty“UV Set”,  [ 0 ] );
         
g_oPresetHelper.setNumericProperty“Smooth On”,  [ 1 ] );
         
g_oPresetHelper.setNumericPropertyWithAttributes“Smooth Angle”true0180[ 89.9 ] );
      break;

      default:
      break;
   
}
}
 
// This function is called by the DsActions.prototype.begin function above, to set the properties for each collected node.
DsActions.prototype.setProperties = function( oSkeletonoNodebRecurse )
{
   
// Clear skeleton name
   
var sSkeleton “”;
   
   
// Make a note of skeleton and its name if it exists
   
if( oSkeleton )
   
{
      this
.m_oSkeleton oSkeleton;
      
sSkeleton this.m_oSkeleton.name;
   
}
   
   
// Make a note of the current node
   
this.m_oElement oNode;
   
   
// Make a note of the current node's object
   // *** I cant' find getObject() in the DAZ Script reference. Perhaps this function is defined elsewhere in your scripts? ***
   
this.m_oObject = ( this.m_oElement this.m_oElement.getObject() : undefined );

   
// Tell the preset helper which node to target
   
g_oPresetHelper.setTargetElementthis.m_oElement );

   
// Check the current node's name
   
switch( this.m_oElement.name )
   
{
      
case “door”:
         
// Move the door
         
g_oPresetHelper.setTransformProperty“ZTranslate”,  -3.5 ] );
         
g_oPresetHelper.setTransformProperty“YRotate”,  [ 0 ] );
         
         
// Set the door's origin (so it rotates correctly)
         
this.m_oElement.getOriginXControl().setValue47.25 );  
         
this.m_oElement.getOriginYControl().setValue);
         
this.m_oElement.getOriginZControl().setValue( -2.26 );
      break;

      default:
      break;
   
}

   
// If we need to recurse (i.e. also set properties on the node's children
   
if( bRecurse )
   
{
      
// Create a container and place the current node inside
      
var aStack [ oNode ];
      
      
// Keep working while the container has things in it ...
      
while(aStack.length 0)
      
{
         
// ... get the next thing in the container
         
var oParent aStack.pop();
         
         
// ... count its children
         
var nNodes oParent.getNumNodeChildren();
         
         
// ... run through all its children ...
         
var oChild;
         for( var 
0nNodesn++ )
         
{
            
// ... make a note of the current child
            
oChild oParent.getNodeChild);
            
            
// ... if the child is a bone ...
            
if( oChild.inherits“DzBone” ) )
            
{
               
// ... if the child has children of its own, put the child in the container so we can pick it up in the next round
               
if(oChild.getNumNodeChildren() > 0)
                  
aStack.pushoChild );
                  
               
// ... set the child's properties
               
this.setPropertiesoSkeletonoChildfalse );
            
}
         }
      }
   }
}

// This is the activating line of the script which launches the GUI if control is pressed otherwise runs in silent mode.
// These functions probably call the being function above.
g_bCONTROL_PRESSED g_oGui.doDialog() : g_oGui.doNoDialog(); 
 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 24 October 2012 06:50 PM   [ Ignore ]   [ # 18 ]
Active Member
RankRank
Total Posts:  819
Joined  2009-12-07
maclean - 23 October 2012 04:07 AM

Well, I should have known it was too good to be true. This script is causing a new set of problems.

I had been testing the script with a basic door (in Room Creator), which is the slimmed-down version of the main door. Today I tried applying it to the main door, which has numerous other items parented to it - crossbars, dividers, etc - and discovered that when I apply the script, all items parented to the door move a considerable distance away. (That distance appears to be the exact reverse of the distance from the center of the scene - Ztrans -595).

So what I want to know now is, is there a way to ensure all parented items behave properly? I see various oChild references, but I don’t know what they mean. In this script, the final line reads
this.setProperties( oSkeleton, oChild, false );
whereas in my old 1.5 script, it reads
this.setProperties( oSkeleton, oChild, bRecurse );

I tried changing it to bRecurse, but with no luck. I’m almost ready to forget this and use the old v1.5 script which works perfectly.


Here’s my understanding of the script (some of these are assumptions because I don’t have the whole script):

1. You collect the selected nodes (including all their children if recurse is checked).
2. Then you run through all the collected nodes and if its name is “door” you move it and set its origin.
3. Then collect the selected surfaces and run through all of those.
4. If a surface has a material named hinge or hingback, you make it look pretty.

The this.setProperties( oSkeleton, oChild, false ) looks right to me, because if you’d checked recurse, its going to pick up all the children anyway when you collect selected nodes in #1, therefore no need to recurse again when setting the properties.

I also don’t think the script is causing the children to move away from the centre, because the script is ONLY touching a node named “door”. I wonder if DS is doing something to the children when the parent door moves. I’ll experiment with this and let you know - you using 4.5?

 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 25 October 2012 07:16 AM   [ Ignore ]   [ # 19 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  15742
Joined  2003-10-09

Edited the comment lines so that the page wasn’t running into the black border, rendering text unreadable.

Yes, parented items can behave oddly with rotation - I can’t recall when, or what the fix/work around is but I ssupect that’s the problem here, rather than anything in the script itself.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 25 October 2012 10:05 AM   [ Ignore ]   [ # 20 ]
Active Member
Avatar
RankRank
Total Posts:  776
Joined  2003-10-09

Ok. Hold everything, guys!! I’ve solved the issue. And in the dumbest way imaginable.

I was continuing updating the other scripts I have (there are hundreds of them!) and I came across one which changes switching geometry - ie - sets it to one of the alternatives. Of course, I hadn’t a clue how this would be written in DS 3, so I spent an hour going through the SDK docs and found nothing relating to alt geom (I never can find anything useful in those docs).

Anyway, to cut to the chase, on an impulse, I opened the old script in the IDE window, which of course, automatically updated it to DS 3 format. I then resaved and tested that script and it worked fine. I checked it in an editor and it all looked good, so I went back to the set origin script and did the same. Again, it updated, and again, it worked fine. (I haven’t tried these in DS 4.5 yet).

So, damn it all…. after all this dorking around, the solution was right there in DS 3. And as far as I can tell, the scripts work perfectly, with no issues whatsoever., and the parented parts on the door stay exactly where they’re supposed to.

Here’s what I have now. (From the begin function again).

DsActions.prototype.begin = function()
{
var bSelected = false;
var bRecurse = false;
var bRoot = false;
if( g_oGui.getNodes() == g_sSELECTED )
{
  bSelected = true;
}
if( g_oGui.getPropagation() == g_sRECURSIVE )
{
  bRecurse = true;
}
if( g_oGui.getNodes() == g_sROOT )
{
  bRoot = true;
  bSelected = true;
}
this.m_bMorphs = g_oGui.morphsChecked();
this.m_bLimits = g_oGui.limitsChecked();
this.m_bTransforms = g_oGui.transformsChecked();
this.m_bXRot = g_oGui.xRotChecked();
this.m_bYRot = g_oGui.yRotChecked();
this.m_bZRot = g_oGui.zRotChecked();
this.m_bXPos = g_oGui.xTranChecked();
this.m_bYPos = g_oGui.yTranChecked();
this.m_bZPos = g_oGui.zTranChecked();
this.m_bGScl = g_oGui.gScaleChecked();
this.m_bXScl = g_oGui.xScaleChecked();
this.m_bYScl = g_oGui.yScaleChecked();
this.m_bZScl = g_oGui.zScaleChecked();
setBusyCursor();
this.m_aNodes = this.collectNodes( bSelected, bRecurse, bRoot );
beginUndo();
for( var i = 0; i < this.m_aNodes.length; i++ )
{
  this.setProperties( this.m_aNodes[ i ].getSkeleton(), this.m_aNodes[ i ], bRecurse );
}
acceptUndo( String( “\”%1\”” ).arg( g_sSCRIPT_NAME ) );
clearBusyCursor();
}

/*********************************************************************/
DsActions.prototype.setNodeOrigin = function( xChange, yChange, zChange )
{
var movement = new DzVec3( xChange, yChange, zChange );
var curOrigin = this.m_oElement.getOrigin();
var bb = this.m_oElement.getLocalBoundingBox();
bb.translate( curOrigin );
newOrigin = bb.getCenter().add( movement );
if( curOrigin == newOrigin )
  return;
this.m_oElement.setOrigin( newOrigin );
movement = newOrigin.subtract( curOrigin );
var wsrot = this.m_oElement.getWSRot();
var wsscale = this.m_oElement.getWSScale();
var wspos = this.m_oElement.getWSPos();
wspos = wspos.subtract( movement );
movement = wsscale.multiply( wsrot.multVec( movement ) );
this.m_oElement.setWSPos( wspos.add( movement ) );
this.m_oElement.update();
}

/*********************************************************************/
DsActions.prototype.setProperties = function( oSkeleton, oNode, bRecurse )
{
var sSkeleton = “”;
if( oSkeleton )
{
  this.m_oSkeleton = oSkeleton;
  sSkeleton = this.m_oSkeleton.name;
}
this.m_oElement = oNode;
this.m_oObject = ( this.m_oElement ? this.m_oElement.getObject() : undefined );
switch( this.m_oElement.name )
{
  case “door”:
  this.setTransformProperty( “YRotate”, [ 0 ] );
  this.setNodeOrigin( 47.25, 0, -2.26 );
  this.setTransformProperty( “ZTranslate”, [ -3.5 ] );
  break;
  default:
  break;
}
if( bRecurse )
{
  var nNodes = oNode.getNumNodeChildren();
  var oChild;
  for( var n = 0; n < nNodes; n++ )
  {
  oChild = oNode.getNodeChild( n );
  if( oChild.inherits( “DzBone” ) )
  this.setProperties( oSkeleton, oChild, bRecurse );
  }
}
}
g_bCONTROL_PRESSED ? g_oGui.doDialog() : g_oGui.doNoDialog();

I really appreciate all the help, and I’m sorry for any wasted time.

cheers

mac

PS Cridgit - Check your PMs

Profile
 
 
Posted: 25 October 2012 05:46 PM   [ Ignore ]   [ # 21 ]
Active Member
RankRank
Total Posts:  819
Joined  2009-12-07

I’m sure the dumbness/simplicity of the solution is directly proportional to the amount of time you’ve invested in looking for it! LOL LOL

That’s so funny, but no harm done. Just glad you got it working.

Cheers.

 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 25 October 2012 05:48 PM   [ Ignore ]   [ # 22 ]
Active Member
RankRank
Total Posts:  819
Joined  2009-12-07

@Richard: by the way, code blocks and/or comments seems to cause havoc with the page formatting. You might want to ask the web team to look into this. Not only do the comments not wrap, but the page numbering and Prev/Next buttons don’t work properly on pages with code/comments.

Cheers

 Signature 

PoseMaster for DAZ Studio and PoseMaster People Pack now sold at Rendo.

Profile
 
 
Posted: 26 October 2012 03:54 AM   [ Ignore ]   [ # 23 ]
Active Member
Avatar
RankRank
Total Posts:  776
Joined  2003-10-09

It also seems to be doing other weird things. This post is listed in New Posts as having 22 pages. I clicked on page 22 and arrived here, which is actually the top of page 3. But when I previously came to the thread from the Developer Forum page, cridgit’s post (above this one) was at the bottom of page 2.

Edit - After posting this, I arrived back at the bottom of page 2. LOL.

mac

Profile
 
 
Posted: 26 October 2012 07:24 AM   [ Ignore ]   [ # 24 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  15742
Joined  2003-10-09

Yes, this forum is till displaying posts instead of pages, and if you click on the last post link it puts it at the top of a page even if it would naturally fall part way down a page. Oh well, coders should be more robust than the average user or something.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 26 October 2012 02:09 PM   [ Ignore ]   [ # 25 ]
Active Member
Avatar
RankRank
Total Posts:  776
Joined  2003-10-09

Argh!

A quick question. Does anyone know if DS 4.5 saves switching geometry code in presets? I’ve tried the .duf types - Pose, Char - and they both seem to ignore it.

The resaved presets for switching geom don’t work in DS 4.5 (Surprise!), and neither do the original ones. I’m now trying to figure out what the code could possibly be. Or is it just broken? I know DS 4.5 has had issues with alt geom from the beginning.

mac

Profile
 
 
Posted: 26 October 2012 04:08 PM   [ Ignore ]   [ # 26 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  15742
Joined  2003-10-09

Is the geometry switching working on the figures? We found the other day that some very old items (Anton’s Victoria Changing Ponytail for example) was showing a drop-down list instead of a slider, and wasn’t applying materials or morphs to the alternative forms. A more recent item I made, on the other hand, is working tvia slider and is applying materials correctly. So it looks as if there may be subtle differences in how different items are handled.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 27 October 2012 04:00 AM   [ Ignore ]   [ # 27 ]
Active Member
Avatar
RankRank
Total Posts:  776
Joined  2003-10-09

Yes, everything works fine, but by dropdown menu - not a slider.

Bear in mind that all these figures are being opened from the Poser directory. One of the reasons for this Room Creator upgrade is to remove all .daz scenes and data so the user will only have a Poser install with .DSAs, plus the folders of DS presets (Materials & Poses, plus Toolbar). That’s why I’m opening everything from the Poser dirs.

So these are normal .cr2s and they all use menus for alt geom. What difference that makes, I don’t know, but it doesn’t seem like that’s the issue.

mac

Profile
 
 
Posted: 27 October 2012 07:09 AM   [ Ignore ]   [ # 28 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  15742
Joined  2003-10-09

Both of the items I was using were CR2s - there just seems to be a slight difference. However, when I checked I had the morphs from the base shape showing on all shapes which isn’t how it should work so even the one that was showing and responding to a slider wasn’t fully functional.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 27 October 2012 08:53 AM   [ Ignore ]   [ # 29 ]
Active Member
Avatar
RankRank
Total Posts:  776
Joined  2003-10-09

But is there any savable 4.5 preset which includes alt geom settings? I can’t find one.

I want to see what code it uses in the hope I can use it to update the ones I have.

mac

Profile
 
 
Posted: 27 October 2012 12:37 PM   [ Ignore ]   [ # 30 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  15742
Joined  2003-10-09

I can’t see a way to save the setting in a .duf file, but it worked in a .dsa preset. with both the Victoria Changing Ponytail (no slider) and my item (with slider).

g_oPresetHelper.setNumericProperty"Geometry",  "bangs_2" ); 
 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
   
2 of 3
2