script about Schematic.

Discussions concerning programming of SOFTIMAGE©
take_tommy
Posts: 3
Joined: 15 Feb 2012, 09:04

script about Schematic.

Post by take_tommy » 15 Feb 2012, 14:07

Hi!

Since English is very poor, it is difficult to tell, please answer.


There is a question about "Schematic" newly supported by softimage2012.

Using this command, it is trying to make the script which arranges a node in the specified position.

Although the position information on each node has acquired the sample etc. to reference now, the method of going to set position information is not known.

how should it describe?


Currently, the position of the node was able to acquire.
※It has seldom changed from the sample.
↓
:-\

Code: Select all

from siutils import *	
viewname = 'MySchematic'
desktop = Application.Desktop;
activelayout = desktop.ActiveLayout

v = activelayout.FindView( viewname )
if v == None:
	log('Creating new schematic...: %s' % (viewname))
	v = activelayout.CreateView( "Schematic", viewname )

sv = disp(v)
for node in sv.Nodes:
	(x,y,w,h) = node.UIInfo
	log( 'name=%s x=%d y=%d w=%d h=%d ' % (node.Name,x,y,w,h,) )
You do not have the required permissions to view the files attached to this post.

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: script about Schematic.

Post by EricTRocks » 17 Feb 2012, 11:48

You're going to have to get into some fun math logic for that. Here is a simple plugin that expands / collapses nodes from their average position. Take a look at the code (not the prettiest I've done but gets the job done).

One down side is that you have to recurse all of the nodes under the selected ones to move them. This implementation only does the selected nodes and their direct children. Will look into it but I might have to put in a request for an additional argument that moves all child nodes with the .move() method.

Check it out and the code in it as well which will hopefully point you in the right direction.
http://www.ethivierge.com/et-schematictools/
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

take_tommy
Posts: 3
Joined: 15 Feb 2012, 09:04

Re: script about Schematic.

Post by take_tommy » 18 Feb 2012, 14:56

<EricTRocks

Thank you for your reply!
I investigate mathematical logic.

sorry.
The link has run out.
Would you teach the link place once again?

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: script about Schematic.

Post by Hirazi Blue » 18 Feb 2012, 15:18

The link doesn't work for me either... (@EricTRocks - the "same old" problem, again?)
Stay safe, sane & healthy!

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: script about Schematic.

Post by EricTRocks » 18 Feb 2012, 22:40

See attached file. I really do need to figure this out. @take_tommy, what country are you in that can't access that page?
You do not have the required permissions to view the files attached to this post.
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: script about Schematic.

Post by EricTRocks » 19 Feb 2012, 09:23

I've tried to access my site from a proxy in the netherlands and get to the pages just fine. What happens when you go to the link? Just a dead page or a page not found?
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: script about Schematic.

Post by Hirazi Blue » 19 Feb 2012, 10:59

Yes, from a proxy it works just fine here too... Why? No idea. Part of your website is accessible normally, part of your website throws a "Not found - Sorry, but you are looking for something that isn't here." So something weird is going on. Especially considering that I just tried http://www.ethivierge.com/animstore/, that didn't work a few weeks back and now strangely loads like it should have originally.
Could it have something to do with your Wordpress blog handles new pages? Maybe it only affects the most current page? (Just guessing, BTW)
;)
Stay safe, sane & healthy!

EricTRocks
Moderator
Posts: 754
Joined: 25 Nov 2009, 00:41

Re: script about Schematic.

Post by EricTRocks » 19 Feb 2012, 11:07

Hmm not sure. Wonder if it is a caching issue somewhere along the line. I'll check and see if wordpress caches my pages. Can you try to shift+reload on the page that isn't currently loading to check if its a browser issue (just throwing it out there...).
Eric Thivierge
Lead Kraken Developer, Fabric Engine
http://fabric-engine.github.io/Kraken

User avatar
Hirazi Blue
Administrator
Posts: 5113
Joined: 04 Jun 2009, 10:15

Re: script about Schematic.

Post by Hirazi Blue » 19 Feb 2012, 11:18

Sadly, no: reloading the page doesn't change the result.
And it doesn't seem browser-specific either (I just tested with IE, FF, Chr & Opera)...
Stay safe, sane & healthy!

take_tommy
Posts: 3
Joined: 15 Feb 2012, 09:04

Re: script about Schematic.

Post by take_tommy » 19 Feb 2012, 15:24

@EricTRocks

Thank you for the file.

>what country
I live in Japan.
Currently, the link is visible without any problems.