Digital Art Zone

 
     
What happened to DzPolyShape in DAZ4.5
Posted: 14 September 2012 11:56 PM   [ Ignore ]
Active Member
Avatar
RankRank
Total Posts:  298
Joined  2007-05-08

The code below use to work in DAZ3 with a selected prop the line if( oShape.inherits( “DzPolyShape” ) ) value would be true and then the rest of the code would duplicate the prop… and so forth and so on….

Now at the line if( oShape.inherits( “DzPolyShape” ) ) with the same prop, the value is no longer true… So I’m not even sure if the rest of the code will still work now.

Trying to update my scripts for DS4.5

Also What happened to:


processEvents();
beginUndo();
setBusyCursor();
clearBusyCursor();
acceptUndo(...);

var oShape oSelected.getObject().getCurrentShape();
    var 
oNode = new DzNode();
    var 
pBtn wBtnGrp.selected;
    switch( 
pBtn )
    
{
     
case 0:
      
nCopy 1;
      
sOldLabel oSelected.getLabel();
      
sLabel "%1(%2)".argsOldLabel ).argnCopy );
      while( 
Scene.findNodeByLabelsLabel ) )
      
{
       nCopy 
+= 1;
       
sLabel "%1(%2)".argsOldLabel ).argnCopy );
      
}

      
break;

     case 
1:
      
sOldLabel oSelected.getLabel();
      
sLabel "%1(%2,%3,%4)".argsOldLabel ).argxIteration ).argyIteration ).argzIteration );
      break;

     case 
2:
      
nCopy 1;
      
sOldLabel oSelected.getLabel();
      
sLabel "%1(%2)".argsOldLabel ).argnCopy );
      while( 
Scene.findNodeByLabelsLabel ) )
      
{
       nCopy 
+= 1;
       
sLabel "%1(%2)".argsOldLabel ).argnCopy );
      
}

      
break;
     default:
      
nCopy 1;
      
sOldLabel oSelected.getLabel();
      
sLabel "%1(%2)".argsOldLabel ).argnCopy );
      while( 
Scene.findNodeByLabelsLabel ) )
      
{
       nCopy 
+= 1;
       
sLabel "%1(%2)".argsOldLabel ).argnCopy );
      
}

      
break;
    
}
    oNode
.name sLabel;
    var 
oObject = new DzObject();
    
oNode.setObjectoObject );
    if( 
oShape.inherits"DzPolyShape" ) )
    
{
     
var oShape2 = new DzPolyShape();
     for( var 
0oShape.getNumMaterials(); i++ )
     
{
      oShape2
.addMaterialoShape.getMaterial) );
     
}
     oShape2
.setPolyMeshoShape.getPolyMesh() );
     
oObject.addShapeoShape2 );
     
Scene.addNodeoNode );
     
curNode oNode;
     var 
xProperty;
     
xProperty oSelected.getXPosControl();
     var 
nXPos xProperty.getValue();
     var 
yProperty;
     
yProperty oSelected.getYPosControl();
     var 
nYPos yProperty.getValue();
     var 
zProperty;
     
zProperty oSelected.getZPosControl();
     var 
nZPos zProperty.getValue();
     switch( 
pBtn )
     
{
      
case 0:
       
nXPos nXPos + ( xIteration pXaxisMove );
       
nYPos nYPos + ( xIteration pYaxisMove );
       
nZPos nZPos + ( xIteration pZaxisMove );
       break;

      case 
1:
       
nXPos nXPos + ( ( xIteration ) * pXaxisMove );
       
nYPos nYPos + ( ( yIteration ) * pYaxisMove );
       
nZPos nZPos + ( ( zIteration ) * pZaxisMove );
       break;

      case 
2:
       
nXPos gRndxRandomTranslationMinSlider.valuexRandomTranslationMaxSlider.value );
       
nYPos gRndyRandomTranslationMinSlider.valueyRandomTranslationMaxSlider.value );
       
nZPos gRndzRandomTranslationMinSlider.valuezRandomTranslationMaxSlider.value );
       
pXrotation gRndxRandomRotationMinSlider.valuexRandomRotationMaxSlider.value );
       
pYrotation gRndyRandomRotationMinSlider.valueyRandomRotationMaxSlider.value );
       
pZrotation gRndzRandomRotationMinSlider.valuezRandomRotationMaxSlider.value );
       
aAxisScale gRndaScaleSlider.valueaScaleSliderMax.value );
       
pXaxisScale gRndxScaleSlider.valuexScaleSliderMax.value );
       
pYaxisScale gRndyScaleSlider.valueyScaleSliderMax.value );
       
pZaxisScale gRndzScaleSlider.valuezScaleSliderMax.value );
       break;
      default:
       
nXPos nXPos + ( xIteration pXaxisMove );
       
nYPos nYPos + ( xIteration pYaxisMove );
       
nZPos nZPos + ( xIteration pZaxisMove );
       break;
     
}
     setTransformProperty
"XTranslate"[ nXPos ] );
     
setTransformProperty"YTranslate"[ nYPos ] );
     
setTransformProperty"ZTranslate"[ nZPos ] );
     if( 
xRotationSlider.value != )
      
setTransformProperty"XRotate"[ pXrotation ] );
     if( 
yRotationSlider.value != )
      
setTransformProperty"YRotate"[ pYrotation ] );
     if( 
zRotationSlider.value != )
      
setTransformProperty"ZRotate"[ pZrotation ] );
     if( 
xRandomRotationMinSlider.value != )
      
setTransformProperty"XRotate"[ pXrotation ] );
     if( 
yRandomRotationMinSlider.value != )
      
setTransformProperty"YRotate"[ pYrotation ] );
     if( 
zRandomRotationMinSlider.value != )
      
setTransformProperty"ZRotate"[ pZrotation ] );
     if( 
aScaleSlider.value != )
     
{
      aAxisScale 
aAxisScale 100;
      
setTransformProperty"Scale"[ aAxisScale ] );
      
aAxisScale aAxisScale 100;
     
}
     
else
     
{
      setTransformProperty
"Scale"[ 1 ] );
     
}

     
if( xScaleSlider.value != )
     
{
      pXaxisScale 
pXaxisScale 100;
      
setTransformProperty"XScale"[ pXaxisScale ] );
      
pXaxisScale pXaxisScale 100;
     
}
     
else
     
{
      setTransformProperty
"XScale"[ 1 ] );
     
}

     
if( yScaleSlider.value != )
     
{
      pYaxisScale 
pYaxisScale 100;
      
setTransformProperty"YScale"[ pYaxisScale ] );
      
pYaxisScale pYaxisScale 100;
     
}
     
else
     
{
      setTransformProperty
"YScale"[ 1 ] );
     
}

     
if( zScaleSlider.value != )
     
{
      pZaxisScale 
pZaxisScale 100;
      
setTransformProperty"ZScale"[ pZaxisScale ] );
      
pZaxisScale pZaxisScale 100;
     
}
     
else
     
{
      setTransformProperty
"ZScale"[ 1 ] );
     
}

    } 
 Signature 

My DAZ Store

Profile
 
 
Posted: 17 September 2012 12:31 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRank
Total Posts:  324
Joined  2003-10-09

The geometry pipeline changed significantly ~4.0.2.55. The names of the classes involved now are DzFacetShape and DzFacetMesh.

Nothing happened to the global methods you mention, they are still there.

-Rob

 Signature 

- Documentation Center
- Install Manager
- DAZ Studio 4.x
- DSON Importer
- DSON File Format Specification

Profile
 
 
Posted: 17 September 2012 06:24 PM   [ Ignore ]   [ # 2 ]
Active Member
Avatar
RankRank
Total Posts:  298
Joined  2007-05-08

Thank you, that did the trick smile

BTW:

processEvents();
beginUndo();
setBusyCursor();
clearBusyCursor();
acceptUndo(...);

These work when I run the script, but will throw an error when in debug.

 Signature 

My DAZ Store

Profile