XSI 2012 (

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
User avatar
CommanderGreg
Private Recruit
Posts: 17
Joined: Mon Feb 21, 2011 5:39 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBFII
xbox live or psn: No gamertag set

XSI 2012 (

Post by CommanderGreg »

Hi,

I want to say that I've already used the "Search" function in this forum, and the Support of Autodesk, but I've some problems with the (new) 2012 version.

1) If I want to save something, I get an error: "The disk is write protected", I've already changed the properties of the XSI "Save Scenes" folder to "NOT write protected", but the error still occurs.
2) I can't make friends with "Crosswalk 2012.0", it exports NOTHING...
3) I also can't export anything as model (.dae, .emdl)... but i can IMPORT everything...
4) Allthough I knew, that the Pandemic Mod tools are only usable with 4.x- 5.11 I tried to install them, and when i selected : File -> PlugIn Manager -> pandemic scripts.vbs -> *right click*-> reload; cmd starts and crashes with the message : "Microsoft Registryserver(?*) doesn't work any more"* and i have to click on "close program"; afterwards i get this in XSI:

Code: Select all

- line 377 in C:\...\pandemic scripts.vbs
And here I have the "pandemic scripts.vbs"..., line 377 is red, it is almost at the end of the script:
Hidden/Spoiler:
' Conglomerated by Mike Z
' NOTES:
' If packaging this plugin as an XSIAddon, go to Others and add mesh_exporter.dll to the list of things to package.
' The default dir it puts the DLL in is fine.
' ALSO, make sure the package installs itself into "Pandemic" under Installation Sub-directory, but
' which addons folder you put it in by default doesn't matter.

' -------------------------------------This section from EditFlags.vbs----------------------------------------------

sub ConvertATRBData(myObj)
Dim oldProp
set prim=myObj.ActivePrimitive
set geom = prim.Geometry

' move ATRB cluster data to MAT_ATRB customproperties
for each cls in geom.Clusters
if(Left(cls.name,4)="ATRB") then

' copy the data from MAT_cls.name customproperty
' create a new one, filling in the data
set oldProp = myObj.Properties("MAT_" & cls.name)
set newProp = myObj.AddProperty("ATRB2",,"MAT_" & cls.name)
for each param in oldProp.Parameters
val1=param.value
strpos = InStrRev(param.fullname, ".")
parName = Right(param.fullname,len(param.fullname)-strpos)
newProp.Parameters(parName).Value = val1
next
' set polygon ids for the material flags
s = ""
set oClusterElements = cls.Elements
aElements = oClusterElements.Array
for iIndex=lbound(aElements,1) to ubound(aElements,1)
s = s & aElements(iIndex)
if iIndex<ubound(aElements,1) then
s = s & ","
end if
next
newProp.Parameters("PolygonIDs").value = s

' delete the old customproperty
DeleteObj oldProp
SetValue newProp & ".Name", "MAT_" & cls.name
end if
next

' remove ATRB clusters
for each cls in geom.Clusters
if(Left(cls.name,4)="ATRB") then
RemoveCluster cls
end if
next
end sub

'---------------------------------------------
' Get Dialog
'---------------------------------------------
function get_dialog(out_prop, out_valid)

dim SceneRoot, DialPath, mysliders

out_valid = False

Set SceneRoot = application.activeproject.activescene.root
bFound = False
for each prop in SceneRoot.Properties
if prop.name = "Edit_Attributes" then
DeleteObj prop
end if
next

if not bFound then
set out_Prop = SceneRoot.AddProperty("ATRB2",,"Edit Attributes")
end if

On Error Resume Next
inspectobj out_Prop ,,,siModal

if Err.Number <> 0 then
exit function
end if

out_valid = True

end function

' Main Editflags function

' --------------------------------------------------------------------------
' This callback is where you provide the actual implementation of the
' command.
'
function EditFlags_VBS_Execute()
' Since this command uses no arguments, this callback function
' takes no input arguments either.

dim return, polyArray, atrbProp, atrbCluster, dlgProp

set return = GetValue("SelectionList")
for each obj in return
if obj.type = "polySubComponent" then
polyArray = obj.SubElements
set oPrim = getvalue(obj.obj)
set myObj = oPrim.Parent
set geom = oPrim.Geometry

' first, make sure ATRB data is in new format for this object
ConvertATRBData myObj
bFoundParam=False

get_dialog dlgProp,valid

if valid=True then
for each tempProp in myObj.Properties
if(Left(tempProp.name,8)="MAT_ATRB") then
if not bFoundParam then
bFoundParam=True
' is this the property/cluster i want to add polys too?
for each param in tempProp.Parameters
if param.name <> "PolygonIDs" then
val1="=" & param.value
strpos = InStrRev(param.fullname, ".")
parName = Right(param.fullname,len(param.fullname)-strpos)
val2="=" & dlgProp.Parameters(parName).Value
if val1 <> val2 then
bFoundParam = False
end if
end if
next

if bFoundParam then
set atrbProp = tempProp
end if
end if

' Remove selected polys from tempProp
s = tempProp.Parameters("PolygonIDs").value
dim sPolys
sPolys = Split(s,",")
for i=lbound(sPolys) to ubound(sPolys)
for each idx in polyArray
if "=" & idx = "=" & sPolys(i) then
sPolys(i) = ""
end if
next
next

s=""
for i=lbound(sPolys) to ubound(sPolys)
if sPolys(i)<>"" then
if s <> "" then
s = s & ","
end if
s = s & sPolys(i)
end if
next
tempProp.Parameters("PolygonIDs").value=s

if s = "" then
if atrbProp <> tempProp then
DeleteObj tempProp
end if
end if
end if
next

' create new property
if not bFoundParam then
set atrbProp = myObj.AddProperty("ATRB2",,"MAT_ATRB")
for each param in dlgProp.Parameters
strpos = InStrRev(param.fullname, ".")
parName = Right(param.fullname,len(param.fullname)-strpos)
atrbProp.Parameters(parName).value=param.value
next
end if

' add polys to property
s=atrbProp.Parameters("PolygonIDs").value
for each idx in polyArray
if s <> "" then
s = s & ","
end if
s = s & idx
next
atrbProp.Parameters("PolygonIDs").value=s
DeleteObj dlgProp
end if
end if
next

' All there is to do is log the finshed message
Application.LogMessage "EditFlags finished"

' Finish with success notification
EditFlags_VBS_Execute = true
end function

' --------------------------------------------------------------------------
' This callback allows you to declare the arguments to be used with this
' command as well as whether or not it returns a value. This is the same
' information as is available on the Arguments tab of the command editor.
'
function EditFlags_VBS_Init( in_context )
' Get the command object from the Context input
set oCmd = in_context.Source

' Since we will not use any arguments in this command, we only have
' to indicate the lack of return values
oCmd.ReturnValue = false

' Finish with success notification
EditFlags_VBS_Init = true
end function


' -------------------------------------End section from EditFlags.vbs----------------------------------------------

' -----------------------------------This section from XSI2MSHExporter.vbs------------------------------------------

' traverse a 3d object hierarchy and print parent + children names
sub TraverseHierarchy1( obj)
dim i
Set prims=obj.Primitives

if obj.type = "polymsh" then
' *** New test for SpecWar -- don't reset scale proxy objects
' *** if they're scaled spheres...
if Left(obj.Name, 2) <> "p_" then
Scale obj, 1.000, 1.000, 1.000, siAbsolute, siView, siCtr, siXYZ
if obj.Envelopes.Count>0 then
SetValue obj & ".polymsh.envelopop.mute", True
end if
else
' is a proxy
On Error Resume Next
dim teststr, testval
teststr = obj.Name & ".primitive.sphere.radius"
testval = GetValue(teststr)
if Err.Number <> 0 then
On Error Resume Next
teststr = obj.Name & ".primitive.cube.length"
testval = GetValue(teststr)
if Err.Number <> 0 then
On Error Resume Next
teststr = obj.Name & ".primitive.cylinder.radius"
testval = GetValue(teststr)
if Err.Number <> 0 then
' not originally a cylinder or sphere or cube, so force scaling?
Scale obj, 1.000, 1.000, 1.000, siAbsolute, siView, siCtr, siXYZ
end if
end if
end if
end if
end if

for i = 0 to obj.children.count - 1
TraverseHierarchy1 obj.children(i)
next
end sub

' traverse a 3d object hierarchy and print parent + children names
sub TraverseHierarchy2( obj)
dim i
Set prims=obj.Primitives

if obj.type = "polymsh" then
if obj.Envelopes.Count>0 then
SetValue obj & ".polymsh.envelopop.mute", False
end if
end if

for i = 0 to obj.children.count - 1
TraverseHierarchy2 obj.children(i)
next
end sub



' --------------------------------------------------------------------------
' This callback is where you provide the actual implementation of the
' command.
'
function XSI2MSHExporter_VBS_Execute()
' Since this command uses no arguments, this callback function
' takes no input arguments either.

' ****
' **** XSI2MSH Exporter
' ****

'option explicit

dim root,Obj,prims,prim

' start with root
set root = application.activeproject.activescene.root

TraverseHierarchy1 root
Set Obj=CreateObject("XSI2MSHExporter3.XSISceneExporter3")
Obj.ExportScene ActiveProject, ActiveProject.ActiveScene
TraverseHierarchy2 root


' All there is to do is log the finshed message
Application.LogMessage "XSI2MSHExporter finished"

' Finish with success notification
XSI2MSHExporter_VBS_Execute = true
end function

' --------------------------------------------------------------------------
' This callback allows you to declare the arguments to be used with this
' command as well as whether or not it returns a value. This is the same
' information as is available on the Arguments tab of the command editor.
'
function XSI2MSHExporter_VBS_Init( in_context )
' Get the command object from the Context input
set oCmd = in_context.Source

' Since we will not use any arguments in this command, we only have
' to indicate the lack of return values
oCmd.ReturnValue = false

' Finish with success notification
XSI2MSHExporter_VBS_Init = true
end function

' -----------------------------------End section from XSI2MSHExporter.vbs------------------------------------------

' --------------------------------------------------------------------------
' This callback defines the menu entry for this plug-in.
'
function PandemicTools_Init( in_context )
' Get the menu object from the Context input
set oMnu = in_context.Source

' Add a command item
oMnu.AddCommandItem "Export Mesh", "XSI2MSHExporter_VBS"

' Add a command item
oMnu.AddCommandItem "Edit Flags", "EditFlags_VBS"


' Finish with success notification
PandemicTools_Define = true
end function

' This is the callback that tells XSI what plug-ins are available so that
' when they are invoked, XSI will read the appropriate definition callbacks
'
function XSILoadPlugin( in_reg )
' Set up some basic information for the whole plug-in
in_reg.Name = "XSI Exporter"
in_reg.Author = "Pandemic Studios, with help"
in_reg.Email = ""
in_reg.URL = "http://www.pandemicstudios.com/"
in_reg.Major = 1
in_reg.Minor = 0

' Register the command as one of the plug-in
' items for the plug-in
in_reg.RegisterCommand "XSI2MSHExporter_VBS", "MSHExport"

in_reg.RegisterCommand "EditFlags_VBS", "EditFlagsCommand"

' Register a Menu as another plug-in item to appear
' as a flat entry on the Help menu
in_reg.RegisterMenu siMenuMainFileSceneID, "Pandemic Tools", true

' You can also log a message about this plug-in's installation
Application.LogMessage "Attempting to register DLL..."

' Attempt registering the DLL in both the user and the generic addon directories - Windows only, of course.
myAddonDLL = Application.InstallationPath ( siAddonPath ) & "\Pandemic\Application\bin\nt-x86\mesh_exporter.dll"
myUserAddonDLL = Application.InstallationPath ( siUserAddonPath ) & "\Pandemic\Application\bin\nt-x86\mesh_exporter.dll"
System "regsvr32 /s " & myAddonDLL
System "regsvr32 /s " & myUserAddonDLL

' You can also log a message about this plug-in's installation
Application.LogMessage "The Pandemic MSH Exporter plug-in has been " _
& "successfully installed."

' Finish with success notification
XSILoadPlugin = true
end function
Is it possibly to get the pandemic modtools working in this version of XSI with changing something in this script or something other(I'm not a programmer or smth like that but I'm sure that someone is in this forum) ?... I know, by now, nobody has figured a solution for the earlier versions, but maybe does SOMEONE know a possibility except of MshEx or MshViewer?
Thank you very much , and please excuse my lousy English, I'm Austrian, and so i hope you understand everything...

CommanderGreg
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: XSI 2012 (

Post by AceMastermind »

CommanderGreg wrote:...
...I've some problems with the (new) 2012 version.

1) If I want to save something, I get an error: "The disk is write protected", I've already changed the properties of the XSI "Save Scenes" folder to "NOT write protected", but the error still occurs.
...
Have a look at THIS thread and see if it helps. I don't use 2012 but many members on XSIbase do, you should create a thread there.
Just google the error with softimage tacked on as an additional keyword and you'll find other results.

CommanderGreg wrote:4) Allthough I knew, that the Pandemic Mod tools are only usable with 4.x- 5.11 I tried to install them, and when i selected : File -> PlugIn Manager -> pandemic scripts.vbs -> *right click*-> reload; cmd starts and crashes with the message : "Microsoft Registryserver(?*) doesn't work any more"* and i have to click on "close program";...

To install an xsiaddon just drag n drop it into any viewport, but it won't work properly with versions higher than 5.11 anyway so you are wasting your time trying to get it working in Softimage 2012(software version 10).
If we had the library source for the exporter then we would be able to update and recompile it easily, but we don't and we can't get it.
If you want to use the Pandemic Tools to export then THIS is your option, there is no reason why you can't use one of these, they are free and available to everyone.

The only other means of exporting to msh are:
BConstructor
SWBFViewer
MshEx
but all of those are limited in terms of what they can export.
User avatar
ANDEWEGET
Ancient Force
Ancient Force
Posts: 1266
Joined: Tue Apr 01, 2008 8:42 am
Location: Germany
Contact:

Re: XSI 2012 (

Post by ANDEWEGET »

So those lines in pandemic scripts.vbs or the corresponding script for the SWBF2 Addon are calling a function/object in the .DLL?

Code: Select all

	Set Obj=CreateObject("XSI2MSHExporter3.XSISceneExporter3")
	Obj.ExportScene ActiveProject, ActiveProject.ActiveScene
VF501
Lieutenant Colonel
Lieutenant Colonel
Posts: 539
Joined: Fri Jun 08, 2007 1:18 am
Projects :: Various Stuff- Weapon models. UDK Stuff
Games I'm Playing :: Fallout New Vegas
xbox live or psn: Vintage Tagious
Location: Terra Firma, Sol System; Milky Way

Re: XSI 2012 (

Post by VF501 »

The Pandemic tools for XSI (SWBF1 or SWBF2) will never work with softimage2012 or any version of XSI 7.0 and up, ever. When Avid Software wrote XSI 7.0, they overhauled the XSI Core engine because of their new ICE system.

The tools will work with 4.2-5.11 and there is the remote, very remote chance it might work with XSI 6.0 since one person had success with it, which they were unable to recreate however.

As Ace said, if we had the source, we could make a new version of the latest softimage versions, but pandemic never released it. At this point we have no idea who even has it.
User avatar
CommanderGreg
Private Recruit
Posts: 17
Joined: Mon Feb 21, 2011 5:39 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBFII
xbox live or psn: No gamertag set

Re: XSI 2012 (

Post by CommanderGreg »

Is it possible that I create my objects with XSI 2012, save them as collada, wavefront or whatever and import them to the game with the trial versions and the pandemic addon or are the new functions in xsi not compatible with the old ones?
And does anyone can explain me, how to use crosswalk please? :( :wink:
Thank you for the already given answers...
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: XSI 2012 (

Post by FragMe! »

:google: http://download.autodesk.com/global/doc ... =d28e77182

You need to export as 5.0 text to get them into the earlier version on XSI that can use Pandemic.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: XSI 2012 (

Post by AceMastermind »

CommanderGreg wrote:Is it possible that I create my objects with XSI 2012...
You can create objects/animations in any 3d software you feel comfortable using then transfer them to the XSI Foundation trials with a format that supports the data type needed to preserve your work then bring it up to SWBF2 specs and finally export it to SWBF msh.
Wavefront obj is perfect for moving geometry with UVs around and COLLADA(.dae) can preserve bones, envelope weighting, animations and geometry with UVs.
User avatar
giftheck
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2218
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Anniversary

Re: XSI 2012 (

Post by giftheck »

VF501 wrote:As Ace said, if we had the source, we could make a new version of the latest softimage versions, but pandemic never released it. At this point we have no idea who even has it.
Shame really - if we had the source we wouldn't need to bother with the full versions because we could re-write it for use with XSI Mod Tool. Sadly we haven't figured it out and we have no way of getting hold of anybody who wrote that tool.

Maybe one day, eh?
Post Reply