Select Node within current node - how?

Smart people ~ Great Scripts
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Select Node within current node - how?

Post by clintonman »

Draise wrote:Also.. we are programming in Jscript right? or is it Java Script? (So I can study up on it?)
Yes... Jscript is Microsofts brand of Javascript.

Outside of stans link you will need to look at the SDK docs, classes.html The IRixxx pages (IRiNodeitem IRiSpaceCommand etc), have most of the scripting information.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Select Node within current node - how?

Post by trueBlue »

Try disconnecting and connecting your shaders with the Macro Recorder to learn the commands. Make sure nothing is selected before starting. You could create a button that runs your commands on your shader that makes the switch.
User avatar
Draise
Captain
Posts: 3198
Joined: 21 Sep 2009, 19:33
Type the number ten into the box: 0
Location: Bogota, Colombia
Contact:

Re: Select Node within current node - how?

Post by Draise »

clintonman wrote: To work with a selection of nodes you use Node.Selection then Node.Selected with an index to loop through the selection.
You do need a full path to get to a node.

I think I have the answer here. But.. not sure how to implement it.

Ok, so...

Code: Select all


Node.Selection(Node.Selected() + "/Project/Space 3D/Cube")


!
I know it doesn't work.
I just don't know how to apply it. Man I'm feeling like a major newb.

Care to expand and/or share an example??
User avatar
clintonman
Captain
Posts: 5429
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Select Node within current node - how?

Post by clintonman »

Oops, I gave you bad advice. I think I meant to use Node.Selected with Node.SelectedCount

Code: Select all

	for (var i=0; i<Node.SelectedCount(); i++)
	{
		var sel = Node.Selected(i);
		System.Trace(sel);
	}
Clinton Reese

http://clintons3d.com
froo
Captain
Posts: 2554
Joined: 22 May 2009, 12:13

Re: Select Node within current node - how?

Post by froo »

Draise,
In the fluid simulation importer package I wrote, there are several examples in the nodes and subnodes of connecting/disconnecting, and navigating through the node network. It involved connecting and disconnecting to/from specific connectors.

Link to zip file is here:

viewtopic.php?f=31&t=3820" onclick="window.open(this.href);return false;
Post Reply