Select Node within current node - how?

Smart people ~ Great Scripts
clintonman
Captain
Posts: 1544
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 » 25 Jun 2014, 01:49

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
Lieutenant Junior Grade
Posts: 892
Joined: 06 Jul 2009, 22:50

Re: Select Node within current node - how?

Post by trueBlue » 28 Jun 2014, 01:50

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: 2810
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 » 08 Jul 2014, 06:32

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??

clintonman
Captain
Posts: 1544
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 » 08 Jul 2014, 16:00

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: 2552
Joined: 22 May 2009, 12:13

Re: Select Node within current node - how?

Post by froo » 08 Jul 2014, 19:19

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

Who is online

Users browsing this forum: No registered users and 1 guest