Heeeeelp! :) Script for obj sequence.

General questions and troubleshooting SOFTIMAGE©
Post Reply
gfeather
Posts: 14
Joined: 18 Nov 2016, 21:30

Heeeeelp! :) Script for obj sequence.

Post by gfeather » 02 Mar 2018, 10:25

Hi There.

So I have been dealing with an issue trying to get Softimage XSI and Realflow to play nice. I unfortunately have XSI 7.01. If I had only had any version higher than this I wouldn't be having these issues.
Realflow doesn't have a plugin for Softimage XSI 7.01, or at least they aren't saying they do. I have a scene, it's been tracked in Syntheyes. The issue is Realflow doesn't read Alembic properly, and the camera settings as well as the orientation of the camera is wrong. About the only thing that is right is the translation. Realflow doesn't like to take animation from any other programs it seems, SO... I have been trying out other avenues.

I have found that I can import multiple objects using a script in Blender, so I have been outputting the mesh sequence in Realflow (OBJ) importing it into Blender, and then making that file a collada file and importing that in XSI,
Which sort of works. But here is the issue:

I need to find a fast way to animate the visibility of OBJ's that are in sequence. They import with names that are followed by 001 002 or 0001 0002 for each step. But of course when they come in they are all visible. So if I could animate the visibility on and off according to the number of the mesh (which should match the current frame) that would really speed things up. (otherwise I have to do it manually for 100's of frames.)

I also bought a copy of Maxwell Studio, which seems to be useless for me. it was advertised as a link for software that doesn't have plugins for Realflow, but the truth is it doesn't do animation either. Again, if it would accept a render via script from Softimage xsi, that would be great.

it does seem that you should be able to write a script for xsi that utilizes maxwell render.

There are no plugins for 7.01 to help me unfortunately. Multi-object import script only works for versions higher than mine. I have no way to purchase Softimage XSI 2015 unfortunately, which I really really wish I could. So any help would be wonderful.

Thanks!

User avatar
myara
Posts: 403
Joined: 28 Sep 2011, 10:33

Re: Heeeeelp! :) Script for obj sequence.

Post by myara » 02 Mar 2018, 11:40

Something like this ?

Code: Select all

# Python
xsi = Application
digits = 3
objs = xsi.ActiveSceneRoot.FindChildren('','polymsh')
for obj in objs:
    frame = int(obj.FullName[digits*-1:])
    xsi.SaveKey(obj.FullName +'.visibility.viewvis', frame, 1)
    xsi.SaveKey(obj.FullName +'.visibility.viewvis', frame +1, 0)
    xsi.SaveKey(obj.FullName +'.visibility.viewvis', frame -1, 0)
The digits part is how many digits is using your sequence's numbering. (001 = 3 digist, 0001 = 4 digits)
The rest of the code is creating 3 keys, a visible one, in the frame that correspond to the object's name, and make it invisible in one frame later and one before.
The "objs" variable is taking all the polygon meshes that are inside your scene.

I think Softimage 7 supports Python but just in case a JScript version

Code: Select all

//JScript
digits = 3
objs = ActiveSceneRoot.FindChildren('','polymsh')
for ( var i=0; i < objs.Count; i++ ) {
    var obj = objs(i)
    frame = parseInt(obj.FullName.substring(obj.FullName.length - digits))
    SaveKey(obj.FullName +'.visibility.viewvis', frame, 1)
    SaveKey(obj.FullName +'.visibility.viewvis', frame +1, 0)
    SaveKey(obj.FullName +'.visibility.viewvis', frame -1, 0)
}
M.Yara
Character Modeler | Softimage Generalist (sort of)

User avatar
Draise
Posts: 891
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Heeeeelp! :) Script for obj sequence.

Post by Draise » 02 Mar 2018, 13:21

You just blew my mind.

gfeather
Posts: 14
Joined: 18 Nov 2016, 21:30

Re: Heeeeelp! :) Script for obj sequence.

Post by gfeather » 02 Mar 2018, 19:44

Genius!

I thank you so much. I was not looking forward to keying every mesh manually :)
I even have time to go out for coffee now.

gfeather
Posts: 14
Joined: 18 Nov 2016, 21:30

Re: Heeeeelp! :) Script for obj sequence.

Post by gfeather » 02 Mar 2018, 19:54

It works great for visibility, is there a way to make it do the same thing for renderability?
:)

gfeather
Posts: 14
Joined: 18 Nov 2016, 21:30

Re: Heeeeelp! :) Script for obj sequence.

Post by gfeather » 02 Mar 2018, 19:56

If I just swap out view visibility for visibility.rendvis would that work?
Going to try that when I get back.

kiwimation
Posts: 61
Joined: 11 Jun 2009, 05:21

Re: Heeeeelp! :) Script for obj sequence.

Post by kiwimation » 03 Mar 2018, 00:27

This should do the trick.

I cant remember the difference between the two addons, they may be the same with a different name But I used this back in the XSI 7 days to get fluids from blender into XSI

I didn't create this, I cant for the life of me remember who did.
If anyone does can you put their name in this thread so they get credit.

https://www.dropbox.com/sh/h0k2gmnbbluw ... kZtaa?dl=0
objseq_q8c.jpg
objseq_q8c.jpg (35.47 KiB) Viewed 1491 times

User avatar
Hirazi Blue
Administrator
Posts: 5107
Joined: 04 Jun 2009, 12:15

Re: Heeeeelp! :) Script for obj sequence.

Post by Hirazi Blue » 03 Mar 2018, 14:04

IIRC this addon was written by Thiago Costa (which the "tc_" in the name seems to confirm). ;)
You can find it in the local backup of our Resource section also under the name Obj sequencer (RMB & Save As)
@rray - how do I link to specific entries in the resource section, to not have to link directly to the download?
Stay safe, sane & healthy!

gfeather
Posts: 14
Joined: 18 Nov 2016, 21:30

Re: Heeeeelp! :) Script for obj sequence.

Post by gfeather » 05 Mar 2018, 01:54

Thanks, I will try that out as well.
It's a similar situation. Realflow - Softimage XSI.

User avatar
rray
Moderator
Posts: 1774
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: Heeeeelp! :) Script for obj sequence.

Post by rray » 09 Mar 2018, 23:20

@Hirazi Blue - not possible at the moment. The plan is to have a link to a forum thread for every plugin. About half of the plugins already have it, but for the others a new thread will have to be created automatically somehow.

The links you're asking for would go to these threads (they would show the plugin at the top like this one).

I'm a bit low on energy atm so this could take a while.. also it's tricky to create a temp solution because all those links would have to be changed later.
softimage resources section updated Jan 5th 2024

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests