SetValue question...

2013-10-04 Thread Sergio Mucino
Okay. I'm trying to write my first SI script (using Python)... and I 
actually got kinda lucky, because I found what I need already scripted 
(ah, the joys of Googleland). I need to create a cluster per each 
selected polygon on an object, and then constraint Nulls to these 
clusters. This script works perfectly...


http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/

I'm now trying to extend the script snippet to be a little more friendly 
to my needs. The first thing I'd like to do is specify the name for the 
clusters created. So, I modified the loop to read like this...


for i in si.Selection(0).SubElements:
c = o.ActivePrimitive.Geometry.AddCluster( clusterType, "", [i] )
cName = c.Name
si.SetValue(cName, "Test", "")
n = si.ActiveSceneRoot.AddNull()
n.Kinematics.AddConstraint( "ObjectToCluster", c )

... but SI is barfing on the SetValue line. It claims that "the 
parameter is incorrect". I know the problem is in the cName reference 
I'm using, but I can't figure out how I need to feed it properly. I know 
that cName's type is 'instance', so I'm not sure how to reference it 
correctly. If anyone has any pointers into how to get this working 
right, I'll be quite grateful.

The noob thanks you in advance.

--
*Sergio Mucino*
Lead Rigger
Modus FX
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-04 Thread Sergio Mucino
Never mind... found it. I found that SetValue expects strings for its 
arguments, so changing cName to:

cName = str(c)+".Name"
did the trick.
Cheers!

*Sergio Mucino*
Lead Rigger
Modus FX

On 04/10/2013 3:40 PM, Sergio Mucino wrote:
Okay. I'm trying to write my first SI script (using Python)... and I 
actually got kinda lucky, because I found what I need already scripted 
(ah, the joys of Googleland). I need to create a cluster per each 
selected polygon on an object, and then constraint Nulls to these 
clusters. This script works perfectly...


http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/

I'm now trying to extend the script snippet to be a little more 
friendly to my needs. The first thing I'd like to do is specify the 
name for the clusters created. So, I modified the loop to read like 
this...


for i in si.Selection(0).SubElements:
c = o.ActivePrimitive.Geometry.AddCluster( clusterType, "", [i] )
cName = c.Name
si.SetValue(cName, "Test", "")
n = si.ActiveSceneRoot.AddNull()
n.Kinematics.AddConstraint( "ObjectToCluster", c )

... but SI is barfing on the SetValue line. It claims that "the 
parameter is incorrect". I know the problem is in the cName reference 
I'm using, but I can't figure out how I need to feed it properly. I 
know that cName's type is 'instance', so I'm not sure how to reference 
it correctly. If anyone has any pointers into how to get this working 
right, I'll be quite grateful.

The noob thanks you in advance.

--
*Sergio Mucino*
Lead Rigger
Modus FX


--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-04 Thread Alan Fregtman
Avoid SetValue() when possible. Use the object model instead:

c.Name = "Test"



On Fri, Oct 4, 2013 at 3:43 PM, Sergio Mucino wrote:

>  Never mind... found it. I found that SetValue expects strings for its
> arguments, so changing cName to:
> cName = str(c)+".Name"
> did the trick.
> Cheers!
>
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
> On 04/10/2013 3:40 PM, Sergio Mucino wrote:
>
> Okay. I'm trying to write my first SI script (using Python)... and I
> actually got kinda lucky, because I found what I need already scripted (ah,
> the joys of Googleland). I need to create a cluster per each selected
> polygon on an object, and then constraint Nulls to these clusters. This
> script works perfectly...
>
>
> http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/
>
> I'm now trying to extend the script snippet to be a little more friendly
> to my needs. The first thing I'd like to do is specify the name for the
> clusters created. So, I modified the loop to read like this...
>
> for i in si.Selection(0).SubElements:
> c = o.ActivePrimitive.Geometry.AddCluster( clusterType, "", [i] )
> cName = c.Name
> si.SetValue(cName, "Test", "")
> n = si.ActiveSceneRoot.AddNull()
> n.Kinematics.AddConstraint( "ObjectToCluster", c )
>
> ... but SI is barfing on the SetValue line. It claims that "the parameter
> is incorrect". I know the problem is in the cName reference I'm using, but
> I can't figure out how I need to feed it properly. I know that cName's type
> is 'instance', so I'm not sure how to reference it correctly. If anyone has
> any pointers into how to get this working right, I'll be quite grateful.
> The noob thanks you in advance.
>
> --
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
> "unsubscribe" and reply to the confirmation email.
>
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-04 Thread Sergio Mucino
Okay. I didn't know that existed. I will look into it (although it looks 
pretty straightforward, and very similar to MAXScript). Thanks Alan!
(BTW, is the object model just more accessible, or are particular 
reasons why we should avoid using SetValue?)


*Sergio Mucino*
Lead Rigger
Modus FX

On 04/10/2013 4:22 PM, Alan Fregtman wrote:

Avoid SetValue() when possible. Use the object model instead:

c.Name = "Test"



On Fri, Oct 4, 2013 at 3:43 PM, Sergio Mucino 
mailto:sergio.muc...@modusfx.com>> wrote:


Never mind... found it. I found that SetValue expects strings for
its arguments, so changing cName to:
cName = str(c)+".Name"
did the trick.
Cheers!


*Sergio Mucino*
Lead Rigger
Modus FX

On 04/10/2013 3:40 PM, Sergio Mucino wrote:

Okay. I'm trying to write my first SI script (using Python)...
and I actually got kinda lucky, because I found what I need
already scripted (ah, the joys of Googleland). I need to create a
cluster per each selected polygon on an object, and then
constraint Nulls to these clusters. This script works perfectly...


http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/

I'm now trying to extend the script snippet to be a little more
friendly to my needs. The first thing I'd like to do is specify
the name for the clusters created. So, I modified the loop to
read like this...

for i in si.Selection(0).SubElements:
c = o.ActivePrimitive.Geometry.AddCluster( clusterType,
"", [i] )
cName = c.Name
si.SetValue(cName, "Test", "")
n = si.ActiveSceneRoot.AddNull()
n.Kinematics.AddConstraint( "ObjectToCluster", c )

... but SI is barfing on the SetValue line. It claims that "the
parameter is incorrect". I know the problem is in the cName
reference I'm using, but I can't figure out how I need to feed it
properly. I know that cName's type is 'instance', so I'm not sure
how to reference it correctly. If anyone has any pointers into
how to get this working right, I'll be quite grateful.
The noob thanks you in advance.

-- 
*Sergio Mucino*

Lead Rigger
Modus FX


--
To unsubscribe: mailsoftimage-requ...@listproc.autodesk.com  
  with subject "unsubscribe" 
and reply to the confirmation email.


--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com
 with subject
"unsubscribe" and reply to the confirmation email.




--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

RE: SetValue question...

2013-10-04 Thread Matt Lind
 
// debug

LogMessage( "  Cluster: " + oCluster.FullName, siComment );


// create a null to constrain to the polygon cluster, then name it.

var oNull  = ActiveSceneRoot.AddNull();

oNull.Name = "N_" + oObject.Name + "_" + oPolygon.Index;


// Apply the 'object to cluster' constraint

var oConstraintOperator = oNull.Kinematics.AddConstraint( "ObjectToCluster", 
oCluster );


if ( oConstraintOperator ) {

LogMessage( "Constraint Operator: " + 
oConstraintOperator.FullName, siComment );

LogMessage( "Constrained " + 
oConstraintOperator.Constrained.FullName + " --> " + 
oConstraintOperator.Constraining.GetAsText(), siComment  );

}
}
}
    }
    }
}



Matt





From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Sergio Mucino
Sent: Friday, October 04, 2013 2:41 PM
To: softimage@listproc.autodesk.com
Subject: Re: SetValue question...

Okay. I didn't know that existed. I will look into it (although it looks pretty 
straightforward, and very similar to MAXScript). Thanks Alan!
(BTW, is the object model just more accessible, or are particular reasons why 
we should avoid using SetValue?)
Sergio Mucino
Lead Rigger
Modus FX

On 04/10/2013 4:22 PM, Alan Fregtman wrote:
Avoid SetValue() when possible. Use the object model instead:

c.Name = "Test"


On Fri, Oct 4, 2013 at 3:43 PM, Sergio Mucino 
mailto:sergio.muc...@modusfx.com>> wrote:
Never mind... found it. I found that SetValue expects strings for its 
arguments, so changing cName to:
cName = str(c)+".Name"
did the trick.
Cheers!

Sergio Mucino
Lead Rigger
Modus FX

On 04/10/2013 3:40 PM, Sergio Mucino wrote:
Okay. I'm trying to write my first SI script (using Python)... and I actually 
got kinda lucky, because I found what I need already scripted (ah, the joys of 
Googleland). I need to create a cluster per each selected polygon on an object, 
and then constraint Nulls to these clusters. This script works perfectly...

http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/

I'm now trying to extend the script snippet to be a little more friendly to my 
needs. The first thing I'd like to do is specify the name for the clusters 
created. So, I modified the loop to read like this...

for i in si.Selection(0).SubElements:
c = o.ActivePrimitive.Geometry.AddCluster( clusterType, "", [i] )
cName = c.Name
si.SetValue(cName, "Test", "")
n = si.ActiveSceneRoot.AddNull()
n.Kinematics.AddConstraint( "ObjectToCluster", c )

... but SI is barfing on the SetValue line. It claims that "the parameter is 
incorrect". I know the problem is in the cName reference I'm using, but I can't 
figure out how I need to feed it properly. I know that cName's type is 
'instance', so I'm not sure how to reference it correctly. If anyone has any 
pointers into how to get this working right, I'll be quite grateful.
The noob thanks you in advance.
--
Sergio Mucino
Lead Rigger
Modus FX



--

To unsubscribe: mail 
softimage-requ...@listproc.autodesk.com<mailto:softimage-requ...@listproc.autodesk.com>
 with subject "unsubscribe" and reply to the confirmation email.

--
To unsubscribe: mail 
softimage-requ...@listproc.autodesk.com<mailto:softimage-requ...@listproc.autodesk.com>
 with subject "unsubscribe" and reply to the confirmation email.





--

To unsubscribe: mail 
softimage-requ...@listproc.autodesk.com<mailto:softimage-requ...@listproc.autodesk.com>
 with subject "unsubscribe" and reply to the confirmation email.
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-04 Thread Jon Swindells
   var oGeometry =
> oObject.ActivePrimitive.Geometry;
>
> 
>
> // debug
>
> LogMessage( "
> NbPolygons: " + oPolygons.Count, siComment );
>
> ** **
>
> for ( var j = 0; j <
> oPolygons.Count; j++ ) {
>
> 
>
> var
> oPolygon = oPolygons(j);
>
> 
>
> // debug**
> **
>
>
> LogMessage( "--", siComment );
>
>
> LogMessage( "Polygon Index: " + oPolygon.Index, siComment );
>
> 
>
> var
> oCluster = oGeometry.AddCluster( siPolygonCluster, "Test", oPolygon.Index );
> 
>
> 
>
> if (
> oCluster ) {
>
>
> // debug
>
>
> LogMessage( "  Cluster: " + oCluster.FullName, siComment );
>
>
> 
>
>
> // create a null to constrain to the polygon cluster, then name it.
>
>
> var oNull  =
> ActiveSceneRoot.AddNull();
> 
>
>
> oNull.Name = "N_" + oObject.Name + "_" + oPolygon.Index;
>
> ** **
>
>
> // Apply the ‘object to cluster’ constraint
>
>
> var oConstraintOperator = oNull.Kinematics.AddConstraint(
> "ObjectToCluster", oCluster );
>
>
> 
>
>
> if ( oConstraintOperator ) {
>
>
> LogMessage( "Constraint Operator: " + oConstraintOperator.FullName,
> siComment );
>
>
> LogMessage( "Constrained " + oConstraintOperator.Constrained.FullName + "
> --> " + oConstraintOperator.Constraining.GetAsText(), siComment  );
>
>
> }
>
> }
>
> }
>
> }
>
> }
>
> }
>
> ** **
>
> ** **
>
> ** **
>
> Matt
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* softimage-boun...@listproc.autodesk.com [mailto:
> softimage-boun...@listproc.autodesk.com] *On Behalf Of *Sergio Mucino
> *Sent:* Friday, October 04, 2013 2:41 PM
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: SetValue question...
>
> ** **
>
> Okay. I didn't know that existed. I will look into it (although it looks
> pretty straightforward, and very similar to MAXScript). Thanks Alan!
> (BTW, is the object model just more accessible, or are particular reasons
> why we should avoid using SetValue?)
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
>
> On 04/10/2013 4:22 PM, Alan Fregtman wrote: 
>
> Avoid SetValue() when possible. Use the object model instead: 
>
> ** **
>
> c.Name = "Test" 
>
> ** **
>
> ** **
>
> On Fri, Oct 4, 2013 at 3:43 PM, Sergio Mucino 
> wrote:
>
> Never mind... found it. I found that SetValue expects strings for its
> arguments, so changing cName to:
> cName = str(c)+".Name"
> did the trick.
> Cheers! 
>
> ** **
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
> ** **
>
> On 04/10/2013 3:40 PM, Sergio Mucino wrote: 
>
> Okay. I'm trying to write my first SI script (using Python)... and I
> actually got kinda lucky, because I found what I need already scripted (ah,
> the joys of Googleland). I need to create a cluster per each selected
> polygon on an object, and then constraint Nulls to these clusters. This
> script works perfectly...
>
>
> http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/
>
> I'm now trying to extend the script snippet to be a little more friendly
> to my needs. The first thing I'd like to do is specify the name for the
> clusters created. So, I modified the loop to read like this...
>
> for i in si.Selection(0).SubElements:
> c = o.ActivePrimitive.Geometry.AddCluster( clusterType, "", [i] )
> cName = c.Name
> si.SetValue(cName, "Test", "")
> n = si.ActiveSceneRoot.AddNull()
> n.Kinematics.AddConstraint( "ObjectToCluster", c )
>

Re: SetValue question...

2013-10-04 Thread Jon Swindells
Jocularity not on the Friday syllabus for you eh Matt :P

for the record, i thought yours was a beautiful explanation :)


On 5 October 2013 02:06, Matt Lind  wrote:

> No, it’s not strictly a matter of being faster.  It’s also a matter of
> code stability and creating tools that do not produce unwanted side effects.
> 
>
> ** **
>
> Unfortunately, not everything is exposed in the scripting object model.
> On some rare occasions you have to bite the bullet and use commands.
>
> ** **
>
> ** **
>
> Matt
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* softimage-boun...@listproc.autodesk.com [mailto:
> softimage-boun...@listproc.autodesk.com] *On Behalf Of *Jon Swindells
> *Sent:* Friday, October 04, 2013 4:00 PM
>
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: SetValue question...
>
> ** **
>
> /start codegolf
>
> it's faster.
>
> /end
>
> ** **
>
> ;)
>
> ** **
>
> ** **
>
> ** **
>
> On 5 October 2013 01:52, Matt Lind  wrote:
>
> SetValue() and the accompanying GetValue() are commands.  Commands
> essentially work from scratch every time they are invoked.
>
>  
>
> When using SetValue() to set the name of the cluster in your example,
> SetValue() needs to parse the string of the cluster name and the ‘.Name’
> parameter, then search the entire scene graph to see if that parameter
> exists.  If so, set the value as specified in your arguments (test).
> Actions performed by commands are logged in the script editor and often
> invoke events or other validations of the application before the task(s)
> are allowed to be performed or completed.  While functional and flexible,
> you can imagine this loop of having to re-parse the entire scene graph to
> set a value can be rather inefficient.  Enter the Scripting object model.*
> ***
>
>  
>
> The scripting object model is similar to working with a DOM in a web
> browser or other application where the graph is exposed for direct
> manipulation.  The methodology of working in the object model is to get a
> reference to an object (node) in the graph, then use the object’s available
> methods and properties to do work.  Because you have a reference to an
> existing object, you don’t have to explicitly get names of things you want
> to manipulate.  You can work in more generic and abstracted terms to make
> your code more universal and bulletproof.  Although you’ll often have to
> write more code to do the same work in the scripting object model compared
> to commands, your code will be significantly more efficient as it doesn’t
> have re-parse the scene graph for every operation you want to carry out,
> nor will it trigger many of the validations and events.  Actions performed
> using the object model are also not logged, so that overhead is eliminated
> as well.
>
>  
>
> Rewriting your code using the scripting object model would look something
> like the example below (Jscript).  I added ‘a lot’ of verbosity and error
> checking for learning purposes, so don’t let the size of the code scare you
> away.  The name of the game is to get a reference to an object in the scene
> graph (provided by the selection in this case), then traverse that graph
> using the obtained object’s properties and methods until you get what you
> want.  Notice I didn’t use any commands in the entire code snippet.  If you
> remove the LogMessage() statements and run this on a large polygon
> selection you’ll find it runs much faster than anything using SetValue().*
> ***
>
>  
>
>  
>
> for ( var i = 0; i < Selection.Count; i++ ) {
>
>  
>
> var oItem = Selection(i);
>
> 
>
> if ( oItem.IsClassOf( siCollectionItemID ) ) {
>
> 
>
> // selected item is a collection item (eg;
> a subset of something)
>
> 
>
> var oSubComponent = oItem.SubComponent;***
> *
>
> var oObject   =
> oSubComponent.Parent3DObject;
>
> 
>
> // debug
>
> LogMessage(
>
> "Object: " +
> oObject.FullName +
>
> "\n   Object Type: " +
> oObject.Type +
>
> "\n  Object Class: " +
> App

Re: SetValue question...

2013-10-07 Thread Stephen Blair
   if ( oSubComponent.Type ==
> "polySubComponent" ) {
>
> 
>
> // subcomponent type is
> polygon
>
> 
>
> var oPolygons =
> oSubComponent.ComponentCollection;
>
> var oGeometry =
> oObject.ActivePrimitive.Geometry;
>
> 
>
> // debug
>
> LogMessage( "
> NbPolygons: " + oPolygons.Count, siComment );
>
> ** **
>
> for ( var j = 0; j <
> oPolygons.Count; j++ ) {
>
> 
>
> var
> oPolygon = oPolygons(j);
>
> 
>
> // debug**
> **
>
>
> LogMessage( "--", siComment );
>
>
> LogMessage( "Polygon Index: " + oPolygon.Index, siComment );
>
> 
>
> var
> oCluster = oGeometry.AddCluster( siPolygonCluster, "Test", oPolygon.Index );
> 
>
> 
>
> if (
> oCluster ) {
>
>
> // debug
>
>
> LogMessage( "  Cluster: " + oCluster.FullName, siComment );
>
>
> 
>
>
> // create a null to constrain to the polygon cluster, then name it.
>
>
> var oNull  =
> ActiveSceneRoot.AddNull();
> 
>
>
> oNull.Name = "N_" + oObject.Name + "_" + oPolygon.Index;
>
> ** **
>
>
> // Apply the ‘object to cluster’ constraint
>
>
> var oConstraintOperator = oNull.Kinematics.AddConstraint(
> "ObjectToCluster", oCluster );
>
>
> 
>
>
> if ( oConstraintOperator ) {
>
>
> LogMessage( "Constraint Operator: " + oConstraintOperator.FullName,
> siComment );
>
>
> LogMessage( "Constrained " + oConstraintOperator.Constrained.FullName + "
> --> " + oConstraintOperator.Constraining.GetAsText(), siComment  );
>
>
> }
>
> }
>
> }
>
> }
>
> }
>
> }
>
> ** **
>
> ** **
>
> ** **
>
> Matt
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* softimage-boun...@listproc.autodesk.com [
> mailto:softimage-boun...@listproc.autodesk.com]
> *On Behalf Of *Sergio Mucino
> *Sent:* Friday, October 04, 2013 2:41 PM
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: SetValue question...
>
> ** **
>
> Okay. I didn't know that existed. I will look into it (although it looks
> pretty straightforward, and very similar to MAXScript). Thanks Alan!
> (BTW, is the object model just more accessible, or are particular reasons
> why we should avoid using SetValue?)
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
>
> On 04/10/2013 4:22 PM, Alan Fregtman wrote: 
>
> Avoid SetValue() when possible. Use the object model instead: 
>
> ** **
>
> c.Name = "Test" 
>
> ** **
>
> ** **
>
> On Fri, Oct 4, 2013 at 3:43 PM, Sergio Mucino 
> wrote:
>
> Never mind... found it. I found that SetValue expects strings for its
> arguments, so changing cName to:
> cName = str(c)+".Name"
> did the trick.
> Cheers! 
>
> ** **
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
> ** **
>
> On 04/10/2013 3:40 PM, Sergio Mucino wrote: 
>
>  Okay. I'm trying to write my first SI script (using Python)... and I
> actually got kinda lucky, because I found what I need already scripted (ah,
> the joys of Googleland). I need to create a cluster per each selected
> polygon on an object, and then constraint Nulls to these clusters. This
> script works perfectly...
>
>
> http://xsisupport.com/2012/03/17/python-example-constraining-nulls-to-components/
>
> I'm no

Re: SetValue question...

2013-10-07 Thread Christopher Crouzet
"\n  Object Class: " +
> Application.ClassName( oObject ) +
>
> "\n SubComponent Type: " +
> oSubComponent.Type +
>
> "\nSubComponent Class: " +
> Application.ClassName( oSubComponent ),
>
> siComment
>
> );
>
> 
>
> if ( oSubComponent.Type ==
> "polySubComponent" ) {
>
> 
>
> // subcomponent type is
> polygon
>
> 
>
> var oPolygons =
> oSubComponent.ComponentCollection;
>
> var oGeometry =
> oObject.ActivePrimitive.Geometry;
>
> 
>
> // debug
>
> LogMessage( "
> NbPolygons: " + oPolygons.Count, siComment );
>
> ** **
>
> for ( var j = 0; j <
> oPolygons.Count; j++ ) {
>
> 
>
> var
> oPolygon = oPolygons(j);
>
> 
>
> // debug**
> **
>
>
> LogMessage( "--", siComment );
>
>
> LogMessage( "Polygon Index: " + oPolygon.Index, siComment );
>
> 
>
> var
> oCluster = oGeometry.AddCluster( siPolygonCluster, "Test", oPolygon.Index );
> 
>
> 
>
> if (
> oCluster ) {
>
>
> // debug
>
>
> LogMessage( "  Cluster: " + oCluster.FullName, siComment );
>
>
> 
>
>
> // create a null to constrain to the polygon cluster, then name it.
>
>
> var oNull  =
> ActiveSceneRoot.AddNull();
> 
>
>
> oNull.Name = "N_" + oObject.Name + "_" + oPolygon.Index;
>
> ** **
>
>
> // Apply the ‘object to cluster’ constraint
>
>
> var oConstraintOperator = oNull.Kinematics.AddConstraint(
> "ObjectToCluster", oCluster );
>
>
> 
>
>
> if ( oConstraintOperator ) {
>
>
> LogMessage( "Constraint Operator: " + oConstraintOperator.FullName,
> siComment );
>
>
> LogMessage( "Constrained " + oConstraintOperator.Constrained.FullName + "
> --> " + oConstraintOperator.Constraining.GetAsText(), siComment  );
>
>
> }
>
> }
>
> }
>
> }
>
> }
>
> }
>
> ** **
>
> ** **
>
> ** **
>
> Matt
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* softimage-boun...@listproc.autodesk.com [
> mailto:softimage-boun...@listproc.autodesk.com]
> *On Behalf Of *Sergio Mucino
> *Sent:* Friday, October 04, 2013 2:41 PM
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: SetValue question...
>
> ** **
>
> Okay. I didn't know that existed. I will look into it (although it looks
> pretty straightforward, and very similar to MAXScript). Thanks Alan!
> (BTW, is the object model just more accessible, or are particular reasons
> why we should avoid using SetValue?)
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
>
> On 04/10/2013 4:22 PM, Alan Fregtman wrote: 
>
> Avoid SetValue() when possible. Use the object model instead: 
>
> ** **
>
> c.Name = "Test" 
>
> ** **
>
> ** **
>
> On Fri, Oct 4, 2013 at 3:43 PM, Sergio Mucino 
> wrote:
>
> Never mind... found it. I found that SetValue expects strings for its
> arguments, so changing cName to:
> cName = str(c)+".Name"
> did the trick.
> Cheers! 
>
> ** **
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>

Re: SetValue question...

2013-10-07 Thread Edy Susanto Lim
Sometimes, I find reading from Info Selection is easier for a quick type
check . Shift + Enter   on the selected object.
for a more detailed nested objects and parameters, port connections etc,
SDK Explorer is the way to go.
-edy


On Tue, Oct 8, 2013 at 5:03 AM, Matt Lind  wrote:

> LogMessage( .Type ) will tell you the object ‘type’
>
> LogMessage( Application.ClassName(  ) ) will tell you the object’s
> class name which is the name of the class (object) you’d look up in the SDK
> docs to find out which properties and methods are available.
>
> ** **
>
> You can use the SDK Explorer (CTRL + SHIFT + 4) to inspect scene items to
> get the above information, but if you want something more inline with your
> coding environment, that falls on your IDE.  I use Microsoft visual studio
> 2012 which gives you full access to the properties and methods of objects
> in the debugger for scripting (VBScript, JScript), C# and C++.  Not sure if
> it supports Python.  It might, but I haven’t checked.
>
> ** **
>
> While primitive, the softimage script / text editors have one benefit –
> you don’t have to run Application.UpdatePlugins() each time you make
> changes to your code. Softimage will do it automatically upon saving your
> changes.
>
> ** **
>
> ** **
>
> Matt
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* softimage-boun...@listproc.autodesk.com [mailto:
> softimage-boun...@listproc.autodesk.com] *On Behalf Of *Sergio Mucino
> *Sent:* Monday, October 07, 2013 6:34 AM
>
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: SetValue question...
>
> ** **
>
> Thanks a lot for the awesomely clear explanation Matt. I'll start getting
> into the Object Model documentation and see what I can start using.
> Just to cut it a bit shorter, what are the standard inspection methods
> available in Softimage (using Python)? I would like to be able to inspect
> the classes and properties for any given object (from an OO perspective,
> not necessarily scene objects) if possible.
> Thanks again!
>
> *Sergio Mucino*
> Lead Rigger
> Modus FX
>
>
> On 04/10/2013 6:52 PM, Matt Lind wrote: 
>
> SetValue() and the accompanying GetValue() are commands.  Commands
> essentially work from scratch every time they are invoked.
>
>  
>
> When using SetValue() to set the name of the cluster in your example,
> SetValue() needs to parse the string of the cluster name and the ‘.Name’
> parameter, then search the entire scene graph to see if that parameter
> exists.  If so, set the value as specified in your arguments (test).
> Actions performed by commands are logged in the script editor and often
> invoke events or other validations of the application before the task(s)
> are allowed to be performed or completed.  While functional and flexible,
> you can imagine this loop of having to re-parse the entire scene graph to
> set a value can be rather inefficient.  Enter the Scripting object model.*
> ***
>
>  
>
> The scripting object model is similar to working with a DOM in a web
> browser or other application where the graph is exposed for direct
> manipulation.  The methodology of working in the object model is to get a
> reference to an object (node) in the graph, then use the object’s available
> methods and properties to do work.  Because you have a reference to an
> existing object, you don’t have to explicitly get names of things you want
> to manipulate.  You can work in more generic and abstracted terms to make
> your code more universal and bulletproof.  Although you’ll often have to
> write more code to do the same work in the scripting object model compared
> to commands, your code will be significantly more efficient as it doesn’t
> have re-parse the scene graph for every operation you want to carry out,
> nor will it trigger many of the validations and events.  Actions performed
> using the object model are also not logged, so that overhead is eliminated
> as well.
>
>  
>
> Rewriting your code using the scripting object model would look something
> like the example below (Jscript).  I added ‘a lot’ of verbosity and error
> checking for learning purposes, so don’t let the size of the code scare you
> away.  The name of the game is to get a reference to an object in the scene
> graph (provided by the selection in this case), then traverse that graph
> using the obtained object’s properties and methods until you get what you
> want.  Notice I didn’t use any commands in the entire code snippet.  If you
> remove the LogMessage() statements and run this on a large polygon
> selection you’ll find it runs much faster than anything using SetValue().*
> ***
>
>

Re: SetValue question...

2013-10-08 Thread Martin
I use a simple script with for loops to log me the obj type, properties,
parameters, nested objects and its values. For these simple tasks I find it
faster than searching in the SDK explorer.

Martin


On Tue, Oct 8, 2013 at 2:55 PM, Edy Susanto Lim wrote:

> Sometimes, I find reading from Info Selection is easier for a quick type
> check . Shift + Enter   on the selected object.
> for a more detailed nested objects and parameters, port connections etc,
> SDK Explorer is the way to go.
> -edy
>
>
> On Tue, Oct 8, 2013 at 5:03 AM, Matt Lind wrote:
>
>> LogMessage( .Type ) will tell you the object ‘type’
>>
>> LogMessage( Application.ClassName(  ) ) will tell you the
>> object’s class name which is the name of the class (object) you’d look up
>> in the SDK docs to find out which properties and methods are available.**
>> **
>>
>> ** **
>>
>> You can use the SDK Explorer (CTRL + SHIFT + 4) to inspect scene items to
>> get the above information, but if you want something more inline with your
>> coding environment, that falls on your IDE.  I use Microsoft visual studio
>> 2012 which gives you full access to the properties and methods of objects
>> in the debugger for scripting (VBScript, JScript), C# and C++.  Not sure if
>> it supports Python.  It might, but I haven’t checked.
>>
>> ** **
>>
>> While primitive, the softimage script / text editors have one benefit –
>> you don’t have to run Application.UpdatePlugins() each time you make
>> changes to your code. Softimage will do it automatically upon saving your
>> changes.
>>
>> ** **
>>
>> ** **
>>
>> Matt
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> ** **
>>
>> *From:* softimage-boun...@listproc.autodesk.com [mailto:
>> softimage-boun...@listproc.autodesk.com] *On Behalf Of *Sergio Mucino
>> *Sent:* Monday, October 07, 2013 6:34 AM
>>
>> *To:* softimage@listproc.autodesk.com
>> *Subject:* Re: SetValue question...
>>
>> ** **
>>
>> Thanks a lot for the awesomely clear explanation Matt. I'll start getting
>> into the Object Model documentation and see what I can start using.
>> Just to cut it a bit shorter, what are the standard inspection methods
>> available in Softimage (using Python)? I would like to be able to inspect
>> the classes and properties for any given object (from an OO perspective,
>> not necessarily scene objects) if possible.
>> Thanks again!
>>
>> *Sergio Mucino*
>> Lead Rigger
>> Modus FX
>>
>>
>> On 04/10/2013 6:52 PM, Matt Lind wrote: 
>>
>> SetValue() and the accompanying GetValue() are commands.  Commands
>> essentially work from scratch every time they are invoked.
>>
>>  
>>
>> When using SetValue() to set the name of the cluster in your example,
>> SetValue() needs to parse the string of the cluster name and the ‘.Name’
>> parameter, then search the entire scene graph to see if that parameter
>> exists.  If so, set the value as specified in your arguments (test).
>> Actions performed by commands are logged in the script editor and often
>> invoke events or other validations of the application before the task(s)
>> are allowed to be performed or completed.  While functional and flexible,
>> you can imagine this loop of having to re-parse the entire scene graph to
>> set a value can be rather inefficient.  Enter the Scripting object model.
>> 
>>
>>  
>>
>> The scripting object model is similar to working with a DOM in a web
>> browser or other application where the graph is exposed for direct
>> manipulation.  The methodology of working in the object model is to get a
>> reference to an object (node) in the graph, then use the object’s available
>> methods and properties to do work.  Because you have a reference to an
>> existing object, you don’t have to explicitly get names of things you want
>> to manipulate.  You can work in more generic and abstracted terms to make
>> your code more universal and bulletproof.  Although you’ll often have to
>> write more code to do the same work in the scripting object model compared
>> to commands, your code will be significantly more efficient as it doesn’t
>> have re-parse the scene graph for every operation you want to carry out,
>> nor will it trigger many of the validations and events.  Actions performed
>> using the object model are also not logged, so that overhead is eliminated
>> as well.
>>
>>  
>>
>> Rewriting your code using the

Re: SetValue question...

2013-10-08 Thread Luc-Eric Rousseau
On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino  wrote:
> I'm not too fond of the Softimage script editor... like Maya's, I only use
> it when I want to execute command-line style querying or commands, or
> copy/paste my scripts onto it. That's about it.

Maya's script editor is terrible, it doesn't even remember that you
loaded a script from a file on disk, so it doesn't know what to do
when you hit ctrl+s.  plus it deletes your script if you run it with
the default button.

the softimage script editor works just as you would expect.  Use
View->Layout->Tools Development Environment for a larger view
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.


Re: SetValue question...

2013-10-08 Thread Alok Gandhi

+1
On 10/8/2013 10:46 AM, Luc-Eric Rousseau wrote:

Maya's script editor is terrible, it doesn't even remember that you
loaded a script from a file on disk, so it doesn't know what to do
when you hit ctrl+s.  plus it deletes your script if you run it with
the default button.



--

ALOK

GANDHI

/ directeur technique senior- senior technical director


alok.gan...@modusfx.com 

T:

*450 430-0010 x225

F:

*450 430-0009
www.modusfx.com 

-


MODUS

FX


120 Rue Turgeon,


Sainte-Therese (Quebec) CANADA J7E 3J1


Follow us on

Facebook 

&

Twitter 
**
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Eric Turman
Yeah the very first time I wrote a script in MEL--a couple dozen lines or
so) I used the editor (like I would in Soft) and ran it to test it, I was
like "okay, it mostly works...if I just tweak the code a little...wait.,
where did the code go.N!"

LOL
Maya is a troll :P


On Tue, Oct 8, 2013 at 9:46 AM, Luc-Eric Rousseau wrote:

> On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
> wrote:
> > I'm not too fond of the Softimage script editor... like Maya's, I only
> use
> > it when I want to execute command-line style querying or commands, or
> > copy/paste my scripts onto it. That's about it.
>
> Maya's script editor is terrible, it doesn't even remember that you
> loaded a script from a file on disk, so it doesn't know what to do
> when you hit ctrl+s.  plus it deletes your script if you run it with
> the default button.
>
> the softimage script editor works just as you would expect.  Use
> View->Layout->Tools Development Environment for a larger view
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>



-- 




-=T=-
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Jon Swindells
you have to have some sort of perverse 'i use notepad to make webs' fetish
to use either of them.

PVTS is really nice, definately worth a go if you use VS


On 8 October 2013 18:17, Eric Turman  wrote:

> Yeah the very first time I wrote a script in MEL--a couple dozen lines or
> so) I used the editor (like I would in Soft) and ran it to test it, I was
> like "okay, it mostly works...if I just tweak the code a little...wait.,
> where did the code go.N!"
>
> LOL
> Maya is a troll :P
>
>
> On Tue, Oct 8, 2013 at 9:46 AM, Luc-Eric Rousseau wrote:
>
>> On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
>> wrote:
>> > I'm not too fond of the Softimage script editor... like Maya's, I only
>> use
>> > it when I want to execute command-line style querying or commands, or
>> > copy/paste my scripts onto it. That's about it.
>>
>> Maya's script editor is terrible, it doesn't even remember that you
>> loaded a script from a file on disk, so it doesn't know what to do
>> when you hit ctrl+s.  plus it deletes your script if you run it with
>> the default button.
>>
>> the softimage script editor works just as you would expect.  Use
>> View->Layout->Tools Development Environment for a larger view
>> --
>> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with
>> subject "unsubscribe" and reply to the confirmation email.
>>
>
>
>
> --
>
>
>
>
> -=T=-
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>



-- 
Jon Swindells
squi...@gmail.com
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Vladimir Jankijevic
on the other hand the maya script editor remembers (saves) the scripts
contained in the tabs so they are still there when you open maya the next
time.
That's a very handy feature if you're trying out different things and it
crashes all the time.
Just sayin'




On Tue, Oct 8, 2013 at 10:46 AM, Luc-Eric Rousseau wrote:

> On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
> wrote:
> > I'm not too fond of the Softimage script editor... like Maya's, I only
> use
> > it when I want to execute command-line style querying or commands, or
> > copy/paste my scripts onto it. That's about it.
>
> Maya's script editor is terrible, it doesn't even remember that you
> loaded a script from a file on disk, so it doesn't know what to do
> when you hit ctrl+s.  plus it deletes your script if you run it with
> the default button.
>
> the softimage script editor works just as you would expect.  Use
> View->Layout->Tools Development Environment for a larger view
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Eric Turman
Actually ever since Alan Fregtman recommended Sublime, I've been using
that. And the tricks it can do, still puts a smile on my face. =)


On Tue, Oct 8, 2013 at 10:56 AM, Vladimir Jankijevic <
vladi...@elefantstudios.ch> wrote:

> on the other hand the maya script editor remembers (saves) the scripts
> contained in the tabs so they are still there when you open maya the next
> time.
> That's a very handy feature if you're trying out different things and it
> crashes all the time.
> Just sayin'
>
>
>
>
> On Tue, Oct 8, 2013 at 10:46 AM, Luc-Eric Rousseau wrote:
>
>> On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
>> wrote:
>> > I'm not too fond of the Softimage script editor... like Maya's, I only
>> use
>> > it when I want to execute command-line style querying or commands, or
>> > copy/paste my scripts onto it. That's about it.
>>
>> Maya's script editor is terrible, it doesn't even remember that you
>> loaded a script from a file on disk, so it doesn't know what to do
>> when you hit ctrl+s.  plus it deletes your script if you run it with
>> the default button.
>>
>> the softimage script editor works just as you would expect.  Use
>> View->Layout->Tools Development Environment for a larger view
>> --
>> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with
>> subject "unsubscribe" and reply to the confirmation email.
>>
>
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>



-- 




-=T=-
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

RE: SetValue question...

2013-10-08 Thread Matt Lind
The softimage script editor does that too as long as you code in the 'script 
editor' and not the 'text editor'.


Matt


From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Vladimir 
Jankijevic
Sent: Tuesday, October 08, 2013 8:56 AM
To: softimage@listproc.autodesk.com
Subject: Re: SetValue question...

on the other hand the maya script editor remembers (saves) the scripts 
contained in the tabs so they are still there when you open maya the next time.
That's a very handy feature if you're trying out different things and it 
crashes all the time.
Just sayin'



On Tue, Oct 8, 2013 at 10:46 AM, Luc-Eric Rousseau 
mailto:luceri...@gmail.com>> wrote:
On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
mailto:sergio.muc...@modusfx.com>> wrote:
> I'm not too fond of the Softimage script editor... like Maya's, I only use
> it when I want to execute command-line style querying or commands, or
> copy/paste my scripts onto it. That's about it.
Maya's script editor is terrible, it doesn't even remember that you
loaded a script from a file on disk, so it doesn't know what to do
when you hit ctrl+s.  plus it deletes your script if you run it with
the default button.

the softimage script editor works just as you would expect.  Use
View->Layout->Tools Development Environment for a larger view
--
To unsubscribe: mail 
softimage-requ...@listproc.autodesk.com<mailto:softimage-requ...@listproc.autodesk.com>
 with subject "unsubscribe" and reply to the confirmation email.

--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Alan Fregtman
Awww. :)

*Sublime ftw!*



On Tue, Oct 8, 2013 at 12:25 PM, Eric Turman  wrote:

> Actually ever since Alan Fregtman recommended Sublime, I've been using
> that. And the tricks it can do, still puts a smile on my face. =)
>
>
> On Tue, Oct 8, 2013 at 10:56 AM, Vladimir Jankijevic <
> vladi...@elefantstudios.ch> wrote:
>
>> on the other hand the maya script editor remembers (saves) the scripts
>> contained in the tabs so they are still there when you open maya the next
>> time.
>> That's a very handy feature if you're trying out different things and it
>> crashes all the time.
>> Just sayin'
>>
>>
>>
>>
>> On Tue, Oct 8, 2013 at 10:46 AM, Luc-Eric Rousseau 
>> wrote:
>>
>>> On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
>>> wrote:
>>> > I'm not too fond of the Softimage script editor... like Maya's, I only
>>> use
>>> > it when I want to execute command-line style querying or commands, or
>>> > copy/paste my scripts onto it. That's about it.
>>>
>>> Maya's script editor is terrible, it doesn't even remember that you
>>> loaded a script from a file on disk, so it doesn't know what to do
>>> when you hit ctrl+s.  plus it deletes your script if you run it with
>>> the default button.
>>>
>>> the softimage script editor works just as you would expect.  Use
>>> View->Layout->Tools Development Environment for a larger view
>>> --
>>> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with
>>> subject "unsubscribe" and reply to the confirmation email.
>>>
>>
>>
>> --
>> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with
>> subject "unsubscribe" and reply to the confirmation email.
>>
>
>
>
> --
>
>
>
>
> -=T=-
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Vladimir Jankijevic
nope, if I close softimage and open it again none of my open tabs would be
there.


On Tue, Oct 8, 2013 at 1:36 PM, Matt Lind  wrote:

> The softimage script editor does that too as long as you code in the
> ‘script editor’ and not the ‘text editor’.
>
> ** **
>
> ** **
>
> Matt
>
> ** **
>
> ** **
>
> *From:* softimage-boun...@listproc.autodesk.com [mailto:
> softimage-boun...@listproc.autodesk.com] *On Behalf Of *Vladimir
> Jankijevic
> *Sent:* Tuesday, October 08, 2013 8:56 AM
>
> *To:* softimage@listproc.autodesk.com
> *Subject:* Re: SetValue question...
>
> ** **
>
> on the other hand the maya script editor remembers (saves) the scripts
> contained in the tabs so they are still there when you open maya the next
> time. 
>
> That's a very handy feature if you're trying out different things and it
> crashes all the time. 
>
> Just sayin'
>
> ** **
>
> ** **
>
> ** **
>
> On Tue, Oct 8, 2013 at 10:46 AM, Luc-Eric Rousseau 
> wrote:
>
> On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
> wrote:
> > I'm not too fond of the Softimage script editor... like Maya's, I only
> use
> > it when I want to execute command-line style querying or commands, or
> > copy/paste my scripts onto it. That's about it.
>
> Maya's script editor is terrible, it doesn't even remember that you
> loaded a script from a file on disk, so it doesn't know what to do
> when you hit ctrl+s.  plus it deletes your script if you run it with
> the default button.
>
> the softimage script editor works just as you would expect.  Use
> View->Layout->Tools Development Environment for a larger view
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>
> ** **
>
> --
> To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject
> "unsubscribe" and reply to the confirmation email.
>
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

RE: SetValue question...

2013-10-08 Thread Matt Lind
Odd.. works here.




From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Vladimir 
Jankijevic
Sent: Tuesday, October 08, 2013 10:39 AM
To: softimage@listproc.autodesk.com
Subject: Re: SetValue question...

nope, if I close softimage and open it again none of my open tabs would be 
there.

On Tue, Oct 8, 2013 at 1:36 PM, Matt Lind 
mailto:ml...@carbinestudios.com>> wrote:
The softimage script editor does that too as long as you code in the 'script 
editor' and not the 'text editor'.


Matt


From: 
softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com>
 
[mailto:softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com>]
 On Behalf Of Vladimir Jankijevic
Sent: Tuesday, October 08, 2013 8:56 AM

To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com>
Subject: Re: SetValue question...

on the other hand the maya script editor remembers (saves) the scripts 
contained in the tabs so they are still there when you open maya the next time.
That's a very handy feature if you're trying out different things and it 
crashes all the time.
Just sayin'



On Tue, Oct 8, 2013 at 10:46 AM, Luc-Eric Rousseau 
mailto:luceri...@gmail.com>> wrote:
On Tue, Oct 8, 2013 at 9:24 AM, Sergio Mucino 
mailto:sergio.muc...@modusfx.com>> wrote:
> I'm not too fond of the Softimage script editor... like Maya's, I only use
> it when I want to execute command-line style querying or commands, or
> copy/paste my scripts onto it. That's about it.
Maya's script editor is terrible, it doesn't even remember that you
loaded a script from a file on disk, so it doesn't know what to do
when you hit ctrl+s.  plus it deletes your script if you run it with
the default button.

the softimage script editor works just as you would expect.  Use
View->Layout->Tools Development Environment for a larger view
--
To unsubscribe: mail 
softimage-requ...@listproc.autodesk.com<mailto:softimage-requ...@listproc.autodesk.com>
 with subject "unsubscribe" and reply to the confirmation email.


--
To unsubscribe: mail 
softimage-requ...@listproc.autodesk.com<mailto:softimage-requ...@listproc.autodesk.com>
 with subject "unsubscribe" and reply to the confirmation email.

--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.

Re: SetValue question...

2013-10-08 Thread Luc-Eric Rousseau
On Tue, Oct 8, 2013 at 11:17 AM, Eric Turman  wrote:
> Yeah the very first time I wrote a script in MEL--a couple dozen lines or
> so) I used the editor (like I would in Soft) and ran it to test it, I was
> like "okay, it mostly works...if I just tweak the code a little...wait.,
> where did the code go.N!"
>
> LOL
> Maya is a troll :P
>

you quickly learn to use the Execute All button rather than Execute,
and then forget that terrible first week experience.  But that doesn't
mean it's not an infuriating design.

that it automatically saves scripts in different tabs, with different
languages, without having them having to reference a file on disk
though? awesome.

p.s.: ctrl+z will bring back the deleted script.
--
To unsubscribe: mail softimage-requ...@listproc.autodesk.com with subject 
"unsubscribe" and reply to the confirmation email.