  | | | R: Scripted operators with N input connections | R: Scripted operators with N input connections 2005-04-24 - By Michele
Back Fantastic, this is exactly what I was looking for. Thanks a lot!!
-- --Messaggio originale-- -- Da: owner-xsi@(protected) [mailto:owner-xsi@(protected)] Per conto di Guy Rabiller Inviato: domenica 24 aprile 2005 12.19 A: XSI@(protected) Oggetto: Re: Scripted operators with N input connections
Hi Michele, there are two ways for doing it. Either by creating a scripted operator from script, in wich case you'll use the "AddPortGroup" method wich recieve as arguments "Min" and "Max". Those arguments indicate the minimum/maximum items that can be connected for a valid connection. If you use 0 for min and a big number for max, you will create an optional port group meaning that at operator creation time there is no need for something to be connected, but you can add as many items ( up to the max limit ) as you want, and remove items from the group down to none, without deleting the operator. Either by editing an operator SPDL, and add in a group description: Min = 0; Max = Infinite; for instance. Once you've done this, the way you organize your 'group' of connected items is up to you, and has nothing to do with the way the portgroup is defined. If you use a Group in your scene, you will have to synchornize manualy the members of the group and the connected item in the operator portgroup. May be add an 'Update' button in your Operator PPG wich would call a Command, updating the portgroup connections regarding to some predifined Group or even a connected Group so you can query both the Group content and the PortGroup content directly and synchronize them. Hope this helps. -- guy rabiller | 3d technical director @ LaMaison
-- -- Original Message -- -- From: Michele <mailto:motionblur@(protected)> To: xsi@(protected) Sent: Thursday, April 21, 2005 11:57 AM Subject: Scripted operators with N input connections
Hi, I need to plug a number of input objects into a scripted operator; the number of these objects can be increased of decreased. I've tried doing this with a group, but I cannot access its members via the .members property via scops. Maybe someone already did something like this before and could help me. Thanks Michele motionblur@(protected)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Messaggio</TITLE>
<META content="MSHTML 6.00.2900.2627" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#e9ede3> <DIV><SPAN class=039194211-24042005><FONT face=Arial color=#0000ff size=2>Fantastic, this is exactly what I was looking for.</FONT></SPAN></DIV> <DIV><SPAN class=039194211-24042005><FONT face=Arial color=#0000ff size=2 >Thanks a lot!!</FONT></SPAN></DIV> <BLOCKQUOTE dir=ltr style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=OutlookMessageHeader lang=it dir=ltr align=left><FONT face=Tahoma size=2>-- --Messaggio originale-- --<BR><B>Da:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>Per conto di </B>Guy Rabiller<BR><B>Inviato:</B> domenica 24 aprile 2005 12.19<BR><B>A:</B> XSI@(protected)<BR><B>Oggetto:</B> Re: Scripted operators with N input connections<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>Hi Michele,</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>there are two ways for doing it.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Either by creating a scripted operator from script, in wich case you'll use the "AddPortGroup" method wich recieve as arguments "Min" and "Max".</FONT></DIV> <DIV><FONT face=Arial size=2>Those arguments indicate the minimum/maximum items that can be connected for a valid connection.</FONT></DIV> <DIV><FONT face=Arial size=2>If you use 0 for min and a big number for max, you will create an optional port group meaning that at operator creation time there is no need for something to be connected, but you can add as many items ( up to the max limit ) as you want, and remove items from the group down to none, without deleting the operator.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Either by editing an operator SPDL, and add in a group description: </FONT></DIV> <DIV><FONT face=Arial size=2>Min = 0;</FONT></DIV> <DIV><FONT face=Arial size=2>Max = Infinite;</FONT></DIV> <DIV><FONT face=Arial size=2>for instance.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Once you've done this, the way you organize your 'group' of connected items is up to you, and has nothing to do with the way the portgroup is defined.</FONT></DIV> <DIV><FONT face=Arial size=2>If you use a Group in your scene, you will have to synchornize manualy the members of the group and the connected item in the operator portgroup.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>May be add an 'Update' button in your Operator PPG wich would call a Command, updating the portgroup connections regarding to some predifined Group or even a connected Group so you can query both the Group content and the PortGroup content directly and synchronize them.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Hope this helps.</FONT></DIV> <DIV>--<BR>guy rabiller | 3d technical director @ LaMaison</DIV> <DIV><BR> </DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:< /B> <A title=motionblur@(protected) href="mailto:motionblur@(protected)">Michele</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=xsi@(protected) href="mailto:xsi@(protected)">xsi@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, April 21, 2005 11:57 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Scripted operators with N input connections</DIV> <DIV><BR></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2>Hi, I need to plug a number of input objects<FONT face=Arial size=2></FONT> into a scripted operator; the number of these objects can be increased of decreased.</FONT></SPAN></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2>I've tried doing this with a group, but I cannot access its members via the .members property via scops.</FONT></SPAN></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2>Maybe someone already did something like this before and could help me.</FONT></SPAN></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2>Thanks</FONT></SPAN></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2>Michele</FONT></SPAN></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2><A href="mailto:motionblur@(protected)">motionblur@(protected)</A></FONT>< /SPAN></DIV> <DIV><SPAN class=646074509-21042005><FONT face=Arial size=2></FONT></SPAN> </DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
|
|
 |