To be clear, I've wrote stuff before in excitement, as I was learning.
I am not an expert, I am not a coder, and I fumbled into 3D modeling and 3D animation as a hobby.
In other words, I've asked for things before which just don't make sense,
so I will clarify each question now since I am less of an idiot as I was in prior years (thanks to LSAT training I think kicking my mental ass)
Sure,
So important things are:
#1 Object and object path.
#2 Positional data.
Here's an example excerpt from the Deluxe Hangar prefab XML file, I don't remember which SC build this is from as I didn't label the folder but I think it was from 2019.
XML:
<PrefabsLibrary Name="deluxe_hangar">
<Prefab Name="deluxe_hangar.t19.deluxe_hangar_t19_stock_mainfloor_a" SubLibrary="" Id="{D1EB4672-895B-42C4-9895-6F21B1EC30D4}" Library="deluxe_hangar" LibFolders="" Footprint="72,136,1" Description="" Category="">
<Objects>
<Object NoStaticDecals="0" Name="Light-3194" CastShadowMinspec="8" RenderNearest="0" LayerGUID="{CE7EBA88-0545-452E-B4FE-56B7425A5FC2}" ShowEnergyLinks="1" Rotate="0.70710671,0,0.70710683,0" Layer="BaseGeoExpLA" CastShadow="1" OutdoorOnly="0" RecvWind="0" Type="Entity" DirtAmount="0" ColorRGB="65535" ShowEntityLinks="1" EntityClass="Light" LodRatio="100" ShowLinks="1" FloorNumber="-1" ManualGridTransition="0" ShowInteractionLinks="1" Pos="23.82220458984375,100.01458740234375,1.0610198974609375" HiddenInGame="0" ViewDistRatio="35" LinkedGlowInProbes="0" WearAmount="0" Id="{D521E91D-BF70-4CD4-999C-704C1DC3B5FF}">
<Properties _bCheapLight="0" bForceDisableCheapLight="0" bActive="1" Radius="0.1" _nVersion="0">
<Audio audioRTPCLuminanceRTPC="" audioTriggerStopTrigger="" bEnableAudio="0" bIsManagedAudioObject="1" audioTriggerPlayTrigger="" />
<Color fTemperature="6600" bLinkIgnoresColor="0" fSpecularMultiplier="0" bUseTemperature="0" clrDiffuse="1,1,1" fDiffuseMultiplier="25" />
<Options fShadowUpdateRatio="1" nCastShadows="0" fFlareFOV="360" bIgnoresVisAreas="0" bShadowCasting="0" fShadowResolutionScale="1" nLightImportance="1" bDeferredClipBounds="0" bAmbient="0" fShadowUpdateMinRadius="10" bAutoDetectClipBox="0" flare_Flare="" fShadowBias="1" fFlareScale="1" fMaxShadowCastDist="0" bFlareEnabled="0" bFakeLight="0" bSoftBulb="0" bAffectsThisAreaOnly="1" fShadowSlopeBiasMultiplier="1" fAttenuationBulbSize="0.05" />
<Projector bFocusedBeam="0" fProjectorNearPlane="0" fProjectorFov="180" texture_Texture="" />
<Shape fPlaneHeight="0.2" fSoftness="1" vFadeDimensionsLeft="0" vFadeDimensionsNear="0" fPlaneWidth="2.4" vFadeDimensionsBottom="0" vFadeDimensionsTop="0" bAreaLight="1" vFadeDimensionsFar="0" vFadeDimensionsRight="0" />
<Style _fTimeScrubbed="0" bRandomAnimationPhase="0" bAttachToSun="0" nLightStyle="3" lightanimation_LightAnimation="" bTimeScrubbingInTrackView="0" fAnimationSpeed="1" nAnimationPhase="4" />
</Properties>
</Object>
See
Pos="23.82220458984375,100.01458740234375,1.0610198974609375"
and
Rotate="0.70710671,0,0.70710683,0"
?
Those give you not only the position of this particular floor object in relation to building the hangar but also it's rotation/orientation.
This particular object doesn't have a data file path, so I assume it's like a brush/CryEngine engine object or something, but hopefully, someone will chime in to clarify.
It's like Minecraft but more complex in that you can spin an object in a number of axes.
I am not sure why there are 4 coordinates for rotation. But I hope someone else can chime in and explain that here?
You can disregard that, I have no idea how blender imports an object, in that I question if it import at a specific coordinate and rotation or just imports an object at 0,0,0 and then the Blender script would have to move the newly imported object into position. I am just speculating how it might work, but I do not actually know.
Yea please ignore all that, sorry.
Can ignore, sorry.
So the XML's are all encoded into Dataforge thingy and have to use Alluran's dataforge tool to make them human-readable XMLs.
I have Alluran's HoloXPLOR.DataForge260.exe but I would guess he's made an updated version since then, but the version I have still works to convert the XMLs.
This is something each person should do BEFORE using your Blender script. IMO.
Sure,
like shown in Number 1,
Here's an actual object file with path the prefab XML for Deluxe Hangar has.
XML:
<Object Prefab="Objects/buildingsets/hangar/deluxe/deluxe_floor_8x8_08.cgf" NoStaticDecals="0" Name="deluxe_floor_8x8_08-058" NoAmnbShadowCaster="0" CastShadowMaps="0" LayerGUID="{B7385F29-9291-4045-A1A3-6DF788B07B46}" Rotate="1,-0,0,-5.165802e-008" RndFlags="536870912" OutdoorOnly="0" RecvWind="0" Occluder="0" Type="Brush" AIObstacle="0" Hideable="0" ColorRGB="16777215" LodRatio="140" ShowLinks="1" SortFar="0" NotTriangulate="0" FloorNumber="-1" Material="Objects/buildingsets/hangar/deluxe/hangar_deluxe_kit_starfarer_grey" Pos="48,0,0" ViewDistRatio="45" ShadowLodBias="0" Layer="BaseGeoExpLC" RainOccluder="1" Id="{62498630-834F-44E0-BCDC-95D10A31AFB1}" NoDynamicWater="0">
<CollisionFiltering>
<Type collision_class_soft="0" gcc_rigid="0" collision_class_wheeled="0" gcc_missile="0" gcc_ai="0" collision_class_living="0" gcc_vehicle="0" collision_class_articulated="0" gcc_player_capsule="0" collision_class_particle="0" gcc_vehicle_interior="0" collision_class_terrain="0" gcc_player_body="0" gcc_ragdoll="0" gcc_projectile="0" />
<Ignore collision_class_soft="0" gcc_rigid="0" collision_class_wheeled="0" gcc_missile="0" gcc_ai="0" collision_class_living="0" gcc_vehicle="0" collision_class_articulated="0" gcc_player_capsule="0" collision_class_particle="0" gcc_vehicle_interior="0" collision_class_terrain="0" gcc_player_body="0" gcc_ragdoll="0" gcc_projectile="0" />
</CollisionFiltering>
</Object>
Object Prefab="Objects/buildingsets/hangar/deluxe/deluxe_floor_8x8_08.cgf" is the game file path. Which is important that I referenced in #1 above.
But It's the responsibility of the person using your blender script to already have converted all these files to be useable in Blender.
So the file path will stay the same more or less but the extension will likely be DAE or OBJ.
Well, doesn't have to be .doc and I have NO idea why I asked for that....
txt file of verbose results of the whole conversion while script is running would be great so users of the script can troubleshoot if something went wrong.
Does any of this help? Do you need a copy of a converted prefab XML for example?