Inspecting ICE node connections from Python

2013-06-18 Thread James Vecore
I'm looking for a way to inspect the connections between ice nodes from
Python. I'm trying to write a tool that will generate and update an ice
graph on demand based on some parameters. I need to be able to inspect an
existing ice graph and most importantly the connections between nodes in the
ICE graph. I can't seem to find how to do this in the docs. All I see
related to node connections is ConnectICENode. Ideally I would like
something like this AreICENodesConnected(outputPort, inputPort) or a way to
enumerate connections but I don't see anything available.

 

Am I missing something or is this just not possible from the Scripting API?

 

Thanks,

 

-James

 

James Vecore  |  Pluto  |  A Creative Content Place  |
<http://hellopluto.com/> hellopluto.com  |  248.723. | 586.295.9473
mobile

 



RE: Inspecting ICE node connections from Python

2013-06-18 Thread James Vecore
Thanks for the reply Steve.

 

I should have been more specific in my question. IsConnect does tell if the
port is connected and I had picked that up from the docs, but I don't see a
way to traverse backwards to the icenode that is feeding an input node. For
example, lets say I have a GetData node (Node A) and a custom ICECompound
(Node B). Node A is connected to an known input port in Node B.  So if I
have a reference to Node B and the input port I'm interested in, how could
find out that Node A is what is connected to that port? If you take the
inputPort.Value you will get None if the value is a complex type (and the
docs say these are not supported). The docs reference using
ICENodePort.Parameters for types that are not supported by
ICENodeInputPort.Value. However, inputPort.Parameters.Count == 0 and
enumerating over it gives:

 

# WARNING : 3407 - Values cannot be accessed on connected ports: 

 

I also searched all the commands with "ICE" in them and didn't see anything
that makes sense for my scenario. 

 

Any Ideas?

 

-James

 

 

From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Steven Caron
Sent: Tuesday, June 18, 2013 2:19 PM
To: softimage@listproc.autodesk.com
Subject: Re: Inspecting ICE node connections from Python

 

you want the ICENodePort class...

 

http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.
html?url=si_om/ICENodePort.html,topicNumber=si_om_ICENodePort_html

 

example code...

 

from siutils import si

si = si()#
win32com.client.Dispatch('XSI.Application')

from siutils import log # LogMessage

from siutils import disp   # win32com.client.Dispatch

from siutils import C   # win32com.client.constants

 

for op in si.Selection(0).ActivePrimitive.ConstructionHistory:

if op.Type == "ICETree":

ICETree = op

lastPort = list(ICETree.InputPorts)[-1]

if lastPort.IsConnected:

si.AddPortToICENode( lastPort,
"siNodePortDataInsertionLocationAfter" )

lastPort = list(ICETree.InputPorts)[-1]

log(lastPort.Name)

 

On Tue, Jun 18, 2013 at 11:10 AM, James Vecore 
wrote:

I'm looking for a way to inspect the connections between ice nodes from
Python. I'm trying to write a tool that will generate and update an ice
graph on demand based on some parameters. I need to be able to inspect an
existing ice graph and most importantly the connections between nodes in the
ICE graph. I can't seem to find how to do this in the docs. All I see
related to node connections is ConnectICENode. Ideally I would like
something like this AreICENodesConnected(outputPort, inputPort) or a way to
enumerate connections but I don't see anything available.

 

Am I missing something or is this just not possible from the Scripting API?

 

Thanks,

 

-James

 

James Vecore  |  Pluto  |  A Creative Content Place  |  hellopluto.com
<http://hellopluto.com/>   |  248.723. | 586.295.9473 mobile

 

 



RE: Inspecting ICE node connections from Python

2013-06-18 Thread James Vecore
Ah perfect, Thanks!

 

Not sure how I missed that one. I was digging through commands and must have
overlooked those Properties.

 

Thank you,

 

-James

 

From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Steven Caron
Sent: Tuesday, June 18, 2013 3:10 PM
To: softimage@listproc.autodesk.com
Subject: Re: Inspecting ICE node connections from Python

 

oh right, you want 'ConnectedPorts' and 'ConnectedNodes' property of an
ICENodePort class. this example isn't a proper step through the graph but it
shows you what you want... i think :)

 

from siutils import si

si = si()#
win32com.client.Dispatch('XSI.Application')

from siutils import log # LogMessage

from siutils import disp   # win32com.client.Dispatch

from siutils import C   # win32com.client.constants

 

for op in si.Selection(0).ActivePrimitive.ConstructionHistory:

if op.Type == "ICETree":

ICETree = op

# output port direction

log("output ports")

for node in op.Nodes:

for port in node.OutputPorts:

for connectedPort,connectedNode in zip(port.ConnectedPorts,
port.ConnectedNodes):

log("%s.%s -> %s.%s" % (node.Name, port.Name,
connectedNode.Name, connectedPort.Name))

# input port direction

log("input ports")

for node in op.Nodes:

for port in node.InputPorts:

for connectedPort,connectedNode in zip(port.ConnectedPorts,
port.ConnectedNodes):

log("%s.%s -> %s.%s" % (node.Name, port.Name,
connectedNode.Name, connectedPort.Name))

 

On Tue, Jun 18, 2013 at 11:43 AM, James Vecore 
wrote:

Thanks for the reply Steve.

 

I should have been more specific in my question. IsConnect does tell if the
port is connected and I had picked that up from the docs, but I don't see a
way to traverse backwards to the icenode that is feeding an input node. For
example, lets say I have a GetData node (Node A) and a custom ICECompound
(Node B). Node A is connected to an known input port in Node B.  So if I
have a reference to Node B and the input port I'm interested in, how could
find out that Node A is what is connected to that port? If you take the
inputPort.Value you will get None if the value is a complex type (and the
docs say these are not supported). The docs reference using
ICENodePort.Parameters for types that are not supported by
ICENodeInputPort.Value. However, inputPort.Parameters.Count == 0 and
enumerating over it gives:

 

# WARNING : 3407 - Values cannot be accessed on connected ports: 

 

I also searched all the commands with "ICE" in them and didn't see anything
that makes sense for my scenario. 

 

Any Ideas?

 

-James

 

 

From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Steven Caron
Sent: Tuesday, June 18, 2013 2:19 PM
To: softimage@listproc.autodesk.com
Subject: Re: Inspecting ICE node connections from Python

 

you want the ICENodePort class...

 

http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.
html?url=si_om/ICENodePort.html,topicNumber=si_om_ICENodePort_html

 

example code...

 

from siutils import si

si = si()#
win32com.client.Dispatch('XSI.Application')

from siutils import log # LogMessage

from siutils import disp   # win32com.client.Dispatch

from siutils import C   # win32com.client.constants

 

for op in si.Selection(0).ActivePrimitive.ConstructionHistory:

if op.Type == "ICETree":

ICETree = op

lastPort = list(ICETree.InputPorts)[-1]

if lastPort.IsConnected:

si.AddPortToICENode( lastPort,
"siNodePortDataInsertionLocationAfter" )

lastPort = list(ICETree.InputPorts)[-1]

log(lastPort.Name)

 

On Tue, Jun 18, 2013 at 11:10 AM, James Vecore 
wrote:

I'm looking for a way to inspect the connections between ice nodes from
Python. I'm trying to write a tool that will generate and update an ice
graph on demand based on some parameters. I need to be able to inspect an
existing ice graph and most importantly the connections between nodes in the
ICE graph. I can't seem to find how to do this in the docs. All I see
related to node connections is ConnectICENode. Ideally I would like
something like this AreICENodesConnected(outputPort, inputPort) or a way to
enumerate connections but I don't see anything available.

 

Am I missing something or is this just not possible from the Scripting API?

 

Thanks,

 

-James

 

James Vecore  |  Pluto  |  A Creative Content Place  |  hellopluto.com
<http://hellopluto.com/>   |  248.723. | 586.295.9473 mobile

 

 

 



Krakatoa and Partio Softimage plugins open sourced

2013-12-31 Thread James Vecore
Hello Everyone,

 

I've open sourced two plugins that I have written for Softimage:

 

KrakatoaForSoftimage (requires a Krakatoa render license)

 <https://github.com/jamesvecore/KrakatoaForSoftimage>
https://github.com/jamesvecore/KrakatoaForSoftimage

 <https://vimeo.com/62377510> https://vimeo.com/62377510

https://vimeo.com/82989087

 

PartioExportForSoftimage

A PartIO based particle exporter (bgeo,geo,bin,prt,pda,pdb,pdc supported)

 <https://github.com/jamesvecore/PartioExportForSoftimage>
https://github.com/jamesvecore/PartioExportForSoftimage

https://vimeo.com/82982792

 

I hope some of you will find this helpful and maybe even contribute back to
the projects.

 

Thank you to everyone on this list that has ever helped me directly or
indirectly.

 

-James

 

James Vecore  |  Pluto  |  A Creative Content Place  |
<http://hellopluto.com/> hellopluto.com  |  248.723. | 586.295.9473
mobile

 



SaveCopyAs

2013-01-03 Thread James Vecore
Hello Everyone,

 

I'm new to the mailing list. My company (Pluto Post) is getting started with
Softimage and ICE. My first task was to setup a custom Qube render job for
V-Ray for Softimage. The issue I have run into is that there seems to be no
way to save a scene and NOT change the current scene's save location. 3dsmax
has a very simple maxscript command to do this and we used it in our custom
max submit. The reason we use SaveCopyAs is that we like to save a copy of
current scene at submission time as a snapshot of the scene in the output
folder. This way we always have a copy of the scene exactly as it was when
the render was submitted and the user is free to continue to save/version
his current scene at his or her discretion without messing with the render
job. 

 

I could not find a way to do this in softimage without double saving (which
I want to avoid, especially with 1GB+ files). I only see two command related
to saving: SaveScene and SaveSceneAs. I also searched the C++ sdk for
anything that would let me achieve what I want and I could not find
anything. My current solution is to save the current scene to the current
path and copy the scene file to the destination. This is not ideal since the
user may not always want to overwrite their scene save before render
(especially our artists that use to the existing 3dsmax workflow). I could
also force a version up save, but that is also not ideal and will generate
many more save versions that necessary.

 

Obviously it is not a deal breaker if SaveCopyAs is not possible, but it
would help ease our transition if anyone has any idea how to accomplish it.

 

Thanks,

 

-James



RE: SaveCopyAs

2013-01-03 Thread James Vecore
Moving the file on save is not a problem, that happens in my python submit
callback on a custom property panel. I was just hoping to be able to save to
an alternate location without changing the current path of the scene like
3dsmax can. I was hoping that even if there is not a script command, that I
could do it from the C++ sdk with a plugin, but I did not see any obvious
way to do so.

 

Thanks,

 

-James

 

From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Simon Anderson
Sent: Thursday, January 03, 2013 9:32 PM
To: softimage@listproc.autodesk.com
Subject: Re: SaveCopyAs

 

Hey, 
A way around this is have create an onSaveEvent and then duplicate and move
the newly saved file to what ever location you wish. The only problem with
this method is that softimage writes into the environment the location of
the file, so if you open a moved scene file that has saved in another
location, you sometimes get the scene location pointing to the old folder
that the file was saved in.

else create your own save(submit to farm) button that saves and then enabled
the onSaveEvent which will move the saved file to what ever location you
have specified. events can be muted so they dont always have to run, so you
can unmute an event perform a save then mute the event afterwards, and the
user would not be any wiser that the file has now been copied to another
location for the farm to read, and they can continue to work.

hope that helps
Cheers
Si

On Fri, Jan 4, 2013 at 1:01 PM, Hans Payer  wrote:

There is no equivalent of a savecopyscene in Softimage. I think copying an
already saved scene to another location is the way to go. Any scripting
language can do that without the need of the sdk, except for getting the
current scene path. I know the workflow is different with Max but  f.y.i.
Softimage will not allow anybody to overwrite a scene once it's pick up by a
node on the farm. In that case, the user has to change his scene file name
if he want to save his scene. 

 

On Thu, Jan 3, 2013 at 7:52 PM, James Vecore  wrote:

Hello Everyone,

 

I'm new to the mailing list. My company (Pluto Post) is getting started with
Softimage and ICE. My first task was to setup a custom Qube render job for
V-Ray for Softimage. The issue I have run into is that there seems to be no
way to save a scene and NOT change the current scene's save location. 3dsmax
has a very simple maxscript command to do this and we used it in our custom
max submit. The reason we use SaveCopyAs is that we like to save a copy of
current scene at submission time as a snapshot of the scene in the output
folder. This way we always have a copy of the scene exactly as it was when
the render was submitted and the user is free to continue to save/version
his current scene at his or her discretion without messing with the render
job. 

 

I could not find a way to do this in softimage without double saving (which
I want to avoid, especially with 1GB+ files). I only see two command related
to saving: SaveScene and SaveSceneAs. I also searched the C++ sdk for
anything that would let me achieve what I want and I could not find
anything. My current solution is to save the current scene to the current
path and copy the scene file to the destination. This is not ideal since the
user may not always want to overwrite their scene save before render
(especially our artists that use to the existing 3dsmax workflow). I could
also force a version up save, but that is also not ideal and will generate
many more save versions that necessary.

 

Obviously it is not a deal breaker if SaveCopyAs is not possible, but it
would help ease our transition if anyone has any idea how to accomplish it.

 

Thanks,

 

-James

 




-- 
---
Simon Ben Anderson
blog: http://vinyldevelopment.wordpress.com/



RE: Good reference books on CUDA Programming anyone ?

2013-03-19 Thread James Vecore
There is a free class from Udacity that covers GPU programming with CUDA:

 

https://www.udacity.com/course/cs344

 

You can compile and run examples and homework from the web (gets executed on
amazon's EC2 GPU farm) so don't even need an nvidia card.

 

It is worth checking out if you want some guided learning.

 

-James

 

 

From: softimage-boun...@listproc.autodesk.com
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Alok Gandhi
Sent: Monday, March 18, 2013 6:30 PM
To: softimage@listproc.autodesk.com
Subject: OT : Good reference books on CUDA Programming anyone ?

 

Hi All,

 

I am planning to start on CUDA. Although I have desired skills to program in
c/c++, still it would be nice to have  a good book to start with. If anyone
knows for some good CUDA Programing books please share. I already have a
good reference start in "CUDA by Example
 ". Any other you guys recommend ?



KrakatoaSR Softimage Integration Test

2013-03-22 Thread James Vecore
Here is a video of a plugin I started working on for Softimage. I'm
integrating KrakatoaSR as a renderer into Softimage:

 

https://vimeo.com/62377510

 

Please excuse the programmer art. I don't actually know how to make anything
look good with Krakatoa yet.

 

Features So Far:

 

-  Integrated as a renderer plug-in using KrakatoaSR's C++ API

-  Works with ICE driven point clouds

-  All Krakatoa supported channels are mapped and pulled from
ice if they exist (Emission, Absorption, etc)

-  All parameters in KrakatoaSR exposed in the renderer options

-  Region render support

-  Scene lights can be restricted with a group

-  Occlusion mesh support (also through a group)

-  Multi-channel EXR output supported.

 

Now for a real question. While integrating the ICE channel support I noticed
that even if I put a Set Data for an attribute like PointNormal, ICE will
still optimize it away unless it is being directly used for display or
simulation. This seems a tad overly aggressive. My current work around is to
drop a log values before the set data and turn off the logging which forces
the channel into existence. Please tell there is some other easier way to
force a channel to not be optimized away? Or some way from C++ to force the
evaluation of the ICEAttribute. I have to imagine other renderers would have
similar problems with channels that aren't needed for viewport display or
simulation but are needed for rendering.

 

Thanks,

 

-James