[Alpha] NifSE v1.0 α:4

Post » Wed Jul 14, 2010 8:31 pm

EDIT: Nevermind, I figured it out.
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Thu Jul 15, 2010 4:03 am

NifSE v1.0 α1.2 is available http://code.google.com/p/nifse/downloads/list. It should fix the NifOpen/Close bugs. Testing of this fact would be appreciated.

shadeMe, note that my listening to CSE is disabled in this version because it was causing hang-ups in the Editor; see the OBSE thread for my asking Scruggs about that. The α1.1 version should have that enabled, though.
User avatar
Alexandra Ryan
 
Posts: 3438
Joined: Mon Jul 31, 2006 9:01 am

Post » Thu Jul 15, 2010 4:15 am

Grabbing it now. Will come back to you shortly.

HeX
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Thu Jul 15, 2010 5:05 am

Right initial impressions are good. The correct mesh *is* being returned each time, so I can DW or Gripshift multiple objects.

Now for the bad (though i'm not sure if this is expected behaviour) After a reload I get missing meshes for a switched object (I know this is expected behaviour) however, I was under the impression that if I then unequip/reequip the offending weapon i'd get the correct mesh back - but in fact I still get a missing mesh.

The following NifSE.log0 - note that I probably switched weapons a few times...

Spoiler

query
load
oblivion root = C:\Games\Oblivion\
List of BSA files: (excluding BSA files known to contain non-NIF data)
C:\Games\Oblivion\Data\DLCShiveringIsles - Meshes.bsa
C:\Games\Oblivion\Data\Oblivion - Meshes.bsa
C:\Games\Oblivion\Data\SaiyanRanger.bsa
3 total.

Registering String Interface.

Setting Serialization callbacks.

Initializing NifSE Hooks.

Initialization complete.


CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
CreateNifFile - Nif not registered.

DeleteNifFile - FileFinder has finished with nifScript file "ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
DeleteNifFile - Nif not registered.

CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
CreateNifFile - Nif not registered.

DeleteNifFile - FileFinder has finished with nifScript file "ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
DeleteNifFile - Nif not registered.

NifLoad - loading saved NifFiles
NifLoad - Clearing previous RegList.
NifLoad - Previous RegList cleared.
NifLoad - Type 'MOD ' Version 999 Length 1
NifLoad - 'MOD ' record - new mod's NifFiles.
NifLoad - Saved modID: 3435973644.
NifLoad - modID resolved: 12.
NifLoad - Type 'niID' Version 999 Length 4
NifLoad - 'niID' record - new NifFile.
NifLoad - New NifFile #12-0.
NifLoad - Type 'niRe' Version 999 Length 0
NifLoad - 'niRe' record - new filename, editable.
NifFile c'tor - Load constructor
NifFile.setRoot - Setting root to root of ""!
CheckFileLocation - File "" found in folders!
WriteNifToStream - File "" could not be read.
NifFile.setRoot - Nif cannot be read. Exception "String too long. Not a NIF file or unsupported format?" thrown.
NifLoad - Filename is "".
NifLoad - Type 'niID' Version 999 Length 4
NifLoad - 'niID' record - new NifFile.
NifLoad - New NifFile #12-1.
NifLoad - Type 'niRe' Version 999 Length 0
NifLoad - 'niRe' record - new filename, editable.
NifFile c'tor - Load constructor
NifFile.setRoot - Setting root to root of ""!
CheckFileLocation - File "" found in folders!
WriteNifToStream - File "" could not be read.
NifFile.setRoot - Nif cannot be read. Exception "String too long. Not a NIF file or unsupported format?" thrown.
NifLoad - Filename is "".
NifLoad - Type 'niID' Version 999 Length 4
NifLoad - 'niID' record - new NifFile.
NifLoad - New NifFile #12-2.
NifLoad - Type 'niRe' Version 999 Length 26
NifLoad - 'niRe' record - new filename, editable.
NifFile c'tor - Load constructor
NifFile.setRoot - Setting root to root of "Weapons\Iron\LongSword.NIF"!
CheckFileLocation - File "Weapons\Iron\LongSword.NIF" found in BSA!
GetNifStream - Successfully read nif data in BSA "C:\Games\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 63559.
NifFile.setRoot - Nif read from stream of file "Weapons\Iron\LongSword.NIF".
NifFile.setRoot - Nif is good; "INVALID VERSION" (4294967294). Loaded 3 ExtraData nodes, collision, 2 Children nodes, and 0 Effects nodes.
NifFile.reg - Registering "Weapons\Iron\LongSword.NIF" on RegList as #12-2.
NifFile.reg - Registered as #12-2.
NifLoad - Filename is "Weapons\Iron\LongSword.NIF".
NifLoad - Type 'niED' Version 999 Length 20
NifLoad - 'niED' record - new ExtraData changes.
NifLoad - ExtraData changelog loaded.
LoadChangelog - Change node: "#1".
LoadChangelog - Change type: "12".
LoadChangelog - Change action: "50".
LoadChangelog - Change value: "BackWeapon".
NifLoad - Changes loaded.
NifLoad - ExtraData node found.
NifLoad - Changing ExtraStringDataNode.
NifLoad - Setting String data to "BackWeapon".
NifLoad - Load complete.

CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
CreateNifFile - Nif not registered.

DeleteNifFile - FileFinder has finished with nifScript file "ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
DeleteNifFile - Nif not registered.

CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
CreateNifFile - Nif not registered.

DeleteNifFile - FileFinder has finished with nifScript file "ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
DeleteNifFile - Nif not registered.

CreateNifFile - FileFinder requesting nifScript file "Meshes\ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
CreateNifFile - Nif not registered.

DeleteNifFile - FileFinder has finished with nifScript file "ni\UVII_2.nif".
getRefNif - Finding nif with filename "UVII_2.nif".
getRegNif - Filename not registered.
DeleteNifFile - Nif not registered.



User avatar
Fam Mughal
 
Posts: 3468
Joined: Sat May 26, 2007 3:18 am

Post » Thu Jul 15, 2010 5:48 am

What was the filename that you passed to this?
User avatar
Russell Davies
 
Posts: 3429
Joined: Wed Nov 07, 2007 5:01 am

Post » Wed Jul 14, 2010 9:40 pm

What was the filename that you passed to this?


Not quite sure what you mean. The mod name is UVII.esp and the associated bit script that made the offending mesh is this:

let path := GetModelPath Weapon
let file_path := GetModelPath Weapon
let nifIDarchive := NifOpen $file_path 1
let file_path := NifGetPath nifIDarchive
let edIndex := NifGetExtraDataIndexByName "Prn" nifIDarchive
NifSetNthExtraDataString "Torch" edIndex nifIDarchive
let childIndex := NifGetChildIndexByName "Scb" nifIDarchive
NifDeleteNthChild childIndex nifIDarchive
User avatar
Andrew Tarango
 
Posts: 3454
Joined: Wed Oct 17, 2007 10:07 am

Post » Wed Jul 14, 2010 8:41 pm

Uh, what's the model path of the weapon, I mean? The string passed to NifOpen.

Because I just tested the save/load bits, and though it did not work correctly, it didn't do what yours did.
User avatar
Kelly John
 
Posts: 3413
Joined: Tue Jun 13, 2006 6:40 am

Post » Wed Jul 14, 2010 6:02 pm

Ah right. In this case I got it by GetModelPath on iron longsword. I think it'd be something like:

data/meshes/weapins/iron/LongSword.NIF

Though of course it's be bsa packaged.

Like I said - it worked just fine initially - I only get errors on reloading a saved game.

HeX
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Thu Jul 15, 2010 6:03 am

OK, try redownloading (same place) - I fixed the way the loading works on my end, see if it fixes yours. I'd be surprised if it did, though, because my problem was not the same as yours.

And can you get a log where the file is created, saved, and then loaded? I.e. run the script, save, and load. That way I can see the entire creation of the nif and see if something got messed up there.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Thu Jul 15, 2010 7:03 am

Doing it now.
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Wed Jul 14, 2010 8:34 pm

Right, that seems to have fixed the problem. :foodndrink:

Of course I still need an unequip/equip but IIRC you said that that was going to be fixed/automated as part of OBSE19 - or willI I still have to call update3d on anyone in the area with a NifSE based weapon even then?
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Wed Jul 14, 2010 11:02 pm

Scruggs is working on that (not sure if we'll actually have to wait for v0019, he's said he'll try to do it as soon as he can), but...

update3d?! This is news to me. We have the ability to force a mesh reload?

If you don't mind, I'd still like that log; I want to see if I can figure out what happened. Because the changes I made should not have fixed what was occurring.
User avatar
Zosia Cetnar
 
Posts: 3476
Joined: Thu Aug 03, 2006 6:35 am

Post » Wed Jul 14, 2010 9:19 pm

I'm afraid I've just overwritten the log, but the full extent of it is in the spoiler tags of that post I made about it.

Yeah - I was pretty stoked about Update3D. That's a truly lovely little addition with a lot of exciting possibilities. It won't make much difference to my DW/GS functionality, since they actually stick the new mesh on a different weapon/shield so you're still going to see a reequip, however I can see that it could be incredibly nice for my rotation effects, and for live modifying current equipment (making a weapon look damaged for example)...
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Wed Jul 14, 2010 11:13 pm

Yeah, that's incredible. When did that get added?
User avatar
Ross
 
Posts: 3384
Joined: Thu Aug 10, 2006 7:22 pm

Post » Thu Jul 15, 2010 4:11 am

Yeah, that's incredible. When did that get added?


Some time during the last OBSE thread. I've been itching to get my hands on OBSE19 ever since I heard about that one. Of course i'm also itching to get it because of the ability to set NPC skeletons (meaning I can have my amputations work reliably).

I've just tested the rotation code. It does seem to be the case that if I read the values and then write them back the weapon stays as it should. Unfortunately I haven't really got the slightest idea what I'm going to have to do to that matrix to correctly invert a weapon... Time to go and read up on the maths of rotation matrices I think :(

I'm suspecting that translation may be slightly easier, but i'm not sure about that either. I suspect I'm going to have to get some help with these, but I'm not even sure who to ask...
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Thu Jul 15, 2010 3:23 am

Well, http://en.wikipedia.org/wiki/Rotation_matrix#Three_dimensions's where I'd start.

I'll try to write up an example script for that, I think, since I've taken a fair amount of linear algebra and am pretty sure I grok this.
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Wed Jul 14, 2010 8:19 pm

Looks like a good place to start. But not tonight. It's 3am, there's a football match for me to laugh at the failure of my adopted country at in 12 hours, and before that I have to sleep and do a days work in the office...

So to bed for now.

Anyway, let me just offer both my thanks and my congratulations for getting this alpha into the state its in. When you lost your PC I really felt for you, and I wasn't sure NIfSE, and subsequently a lot of UVII would ever see the light of day. I've got a real buzz tonight out of seeing it do what its supposed to.

You are a star.

HeX

edit: ooh - that example script would be a nice thing :D
User avatar
Kim Bradley
 
Posts: 3427
Joined: Sat Aug 18, 2007 6:00 am

Post » Thu Jul 15, 2010 7:27 am

Example scripts are available in the DWnifSEexRotations.esp available http://code.google.com/p/nifse/downloads/list. There are five scripts here to look at: three which create a Rotation Matrix from a given angle (one for each axis), one which performs matrix multiplication (note that in matrix multiplication, order matters: A C != C A ), and then the quest script that runs the test - it's a bastardized version of the test script I've been using, so you'll have to ignore some of the extraneous parts, but focus on the not-commented-out while block - you'll see how I get the nif's rotation matrix, create the rotation matrix for the angle I want (180 degrees across the X axis in this case), and multiply the two together to create the new rotation matrix that I pass back to the nif through NifSE. In this case, it takes a knife, and flips it around for stabbing (of course, the animations don't work at all, but I leave that to HeX_0ff, heh).
User avatar
Mason Nevitt
 
Posts: 3346
Joined: Fri May 11, 2007 8:49 pm

Post » Thu Jul 15, 2010 2:54 am

Sweet. Grabbing these now :D
User avatar
DAVId Bryant
 
Posts: 3366
Joined: Wed Nov 14, 2007 11:41 pm

Post » Thu Jul 15, 2010 7:11 am

Yeah, generally to apply a new rotation to it, you want to take the new rotation matrix, and left-multiply it by the existing rotation matrix. By left-multiply, I mean that the new rotation should be the first operand, and the old one the second (so the new one is on the left). It's pretty simple, if you know how matrix multiplication works (Wikipedia's got a good article on that if you care).

Note that my matrix multiplication script is generic; it can multiply any two 2d matrices for which multiplication is defined. This is largely unnecessary for this purpose - rotation matrices are always going to be 3x3, and the checks on this would be a bit simpler if I just only accepted 3x3 matrices, but this way it can be used on the 4x4 matrices from the local transform, as well as on, I dunno, (a 5x3)(a 3x4)=(a 5x4)
User avatar
Siidney
 
Posts: 3378
Joined: Fri Mar 23, 2007 11:54 pm

Post » Thu Jul 15, 2010 3:07 am

Right, Problems problems (i'm sorry about this...)

First off, I can't run your test esp to check it works, as I get a CTD as soon as it kicks in. However I went ahead and attempted to implenent the effects anyway. I've duplicated your other scrupts (prefacing the with uv rather than DW for internal consistency reasons).

Here's the code i'm using:

let file_path := GetModelPath Weapon
let nifIDarchive := NifOpen $file_path 1
let children := NifGetNumChildren nifIDarchive
let R := Call uvgetXRotationMatrix 180
let childIndex := 0
let numChildren := NifGetNumChildren nifIDarchive
while ( childIndex < numChildren )
let locrot := NifGetNthChildLocalRotation childIndex nifIDarchive
let array := Call uvmatMult R locrot ; order matters
let one := array[0][0]
let two := array[0][1]
let three := array[0][2]
let four := array[1][0]
let five := array[1][1]
let six := array[1][2]
let seven := array[2][0]
let eight := array[2][1]
let nine := array[2][2]
PrintC "| %+0.3f %+0.3f %+0.3f |" one two three
PrintC "| %+0.3f %+0.3f %+0.3f |" four five six
PrintC "| %+0.3f %+0.3f %+0.3f |" seven eight nine
NifSetNthChildLocalRotationTEMP one two three four five six seven eight nine childIndex nifIDarchive
let childIndex += 1
loop
SetModelPathEx "%z" file_path newWeapon

It does seem to run, but with no effect on the weapon. Any thoughts? I Imagine i'm just doing something stupid...

Complete script in spoiler tags below (it's probably got some left over variables from an earlier script it was duplicated from.

Spoiler

scn uvRotateGrip

int isPlayer

ref Weapon
ref newWeapon

ref ench
float health
float charges
float weight
float attackdamage
float value
float speed
float reach
int type
int isPlayer
int weaponLoc
int newType
ref temp

string_var path
short nifIDno
short nifIDarchive
short nifIDfolder
short edIndex
short childIndex
short numChildren
array_var array
string_var file_path
string_var name
short children
int counter
array_var array
float one
float two
float three
float four
float five
float six
float seven
float eight
float nine
array_var R
array_var locrot

Begin Function{isPlayer}
printc "rotating weapon"
set Weapon to GetEquippedObject 16
set type to GetWeaponType Weapon

;--first we'll check that the weapon is suitable for switching. Then and only then will we switch it
if(type > 3)
if(isplayer)
Message "Sorry that weapon type is not suitable for rotating"
endif
return
endif
if(Weapon.isQuestItem)
if(isplayer)
Message "Sorry you can't rotate quest items - too many potential issues"
endif
return
endif

;-- get the various values associated with this weapon:
set ench to getenchantment weapon
set health to getequippedcurrenthealth 16
if(ench)
set charges to getequippedcurrentcharge 16
endif
let weaponLoc := player.call uvFindByName Weapon uvVariablesQuest.rotatedWeapons
printc "weaponloc is %.2f" weaponloc

if(weaponLoc == -1)
;-- this weapon has never been rotated
let uvVariablesQuest.rotatedWeapons[ar_size uvVariablesQuest.rotatedWeapons] := Weapon
set newWeapon to CloneForm Weapon
addItemNS newWeapon 1
removeItemNS Weapon 1
setgoldvalue value newweapon
setweight weight newweapon

let file_path := GetModelPath Weapon
let nifIDarchive := NifOpen $file_path 1
let children := NifGetNumChildren nifIDarchive
let R := Call uvgetXRotationMatrix 180
let childIndex := 0
let numChildren := NifGetNumChildren nifIDarchive
while ( childIndex < numChildren )
let locrot := NifGetNthChildLocalRotation childIndex nifIDarchive
let array := Call uvmatMult R locrot ; order matters
let one := array[0][0]
let two := array[0][1]
let three := array[0][2]
let four := array[1][0]
let five := array[1][1]
let six := array[1][2]
let seven := array[2][0]
let eight := array[2][1]
let nine := array[2][2]
PrintC "| %+0.3f %+0.3f %+0.3f |" one two three
PrintC "| %+0.3f %+0.3f %+0.3f |" four five six
PrintC "| %+0.3f %+0.3f %+0.3f |" seven eight nine
NifSetNthChildLocalRotationTEMP one two three four five six seven eight nine childIndex nifIDarchive
let childIndex += 1
loop
SetModelPathEx "%z" file_path newWeapon
;-----------------------------------------------------------------------------

equipItemNS newWeapon
setequippedcurrenthealth health 16
if(ench)
setenchantment ench newWeapon
setequippedcurrentcharge charges 16
endif
appendtoname " Rotated" newWeapon
let uvVariablesQuest.rotatedWeapons[ar_size uvVariablesQuest.rotatedWeapons] := newWeapon
printc "Done rotating new weapon"
else
let temp := uvVariablesQuest.rotatedWeapons[weaponLoc]
let name := getname temp
if (sv_Count "Rotated" name > 0)
;--it's a nifscript mesh so it must be a cloned weapon - that means we're just swapping it back
let newWeapon := uvVariablesQuest.rotatedWeapons[weaponLoc-1]
else
let newWeapon := uvVariablesQuest.rotatedWeapons[weaponLoc]
endif
addItemNS newWeapon 1
removeItemNS Weapon 1
equipItemNS newWeapon
setequippedcurrenthealth health 16
if(ench)
setequippedcurrentcharge charges 16
endif
printc "done rotating back"
endif

if(isPlayer)
enablecontrol 4
endif

End


HeX
User avatar
Rob Davidson
 
Posts: 3422
Joined: Thu Aug 02, 2007 2:52 am

Post » Wed Jul 14, 2010 10:28 pm

What's the Console output say? Namely the output matrix thing that I have there.
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Wed Jul 14, 2010 4:47 pm

Here's the conscribe log from a fresh game with an attempt to rotate an iron dagger:

Spoiler

processed uv ini file
UV Initialisation Complete
NifSE::NifSave - Saving registered nifs
NifSE::NifSave - Save complete.

rotating weapon
weaponloc is -1.00
NifSE::NifOpen - "Weapons\Iron\Dagger.NIF" opened for editing.
NifSE::NifFile c'tor - NifFile created for editing.
NifSE::NifFile.setRoot - Setting root to root of "Weapons\Iron\Dagger.NIF"!
NifSE::CheckFileLocation - File "Weapons\Iron\Dagger.NIF" found in BSA!
NifSE::GetNifStream - Successfully read nif data in BSA "C:\Games\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 50216.
NifSE::NifFile.setRoot - Nif read from stream of file "Weapons\Iron\Dagger.NIF".
NifSE::NifFile.setRoot - Nif is good; "INVALID VERSION" (4294967294). Loaded 3 ExtraData nodes, collision, 2 Children nodes, and 0 Effects nodes.
NifSE::NifFile.reg - Registering "Weapons\Iron\Dagger.NIF" on RegList.
NifSE::NifFile.reg - Registered as #4-0.
NifSE::NifOpen - "Weapons\Iron\Dagger.NIF" registered as #4-0.

NifSE::NifGetNumChildren - Getting number of Children nodes in nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNumChildren - Returning 2 Children nodes.

NifSE::NifGetNumChildren - Getting number of Children nodes in nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNumChildren - Returning 2 Children nodes.

NifSE::NifGetNthChildLocalRotation - Getting local Rotation of Child #0 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNthChildLocalRotation - Returning child's local rotation.

Element (0, 0) is 1.
Element (0, 1) is 0.
Element (0, 2) is 0.
Element (1, 0) is 0.
Element (1, 1) is -1.
Element (1, 2) is 8.74228e-008.
Element (2, 0) is 0.
Element (2, 1) is -8.74228e-008.
Element (2, 2) is -1.
Returning product.
| +1.000 +0.000 +0.000 |
| +0.000 -1.000 +0.000 |
| +0.000 -0.000 -1.000 |
NifSE::NifSetNthChildLocalRotation - Setting local Rotation of Child #0 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifSetNthChildLocalRotation - Local Rotation of Child #0 of nif #4-0 has been set.

NifSE::NifGetNthChildLocalRotation - Getting local Rotation of Child #1 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNthChildLocalRotation - Returning child's local rotation.

Element (0, 0) is 1.
Element (0, 1) is 0.
Element (0, 2) is 0.
Element (1, 0) is 0.
Element (1, 1) is -1.
Element (1, 2) is 8.74228e-008.
Element (2, 0) is 0.
Element (2, 1) is -8.74228e-008.
Element (2, 2) is -1.
Returning product.
| +1.000 +0.000 +0.000 |
| +0.000 -1.000 +0.000 |
| +0.000 -0.000 -1.000 |
NifSE::NifSetNthChildLocalRotation - Setting local Rotation of Child #1 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifSetNthChildLocalRotation - Local Rotation of Child #1 of nif #4-0 has been set.

Done rotating new weapon
qqq
Bye.


HeX
User avatar
Laura Shipley
 
Posts: 3564
Joined: Thu Oct 26, 2006 4:47 am

Post » Wed Jul 14, 2010 5:48 pm

I'm sorry to interrupt. Quick question.
Can NifSE provide a means to alter the texture associated with a mesh or it only works with item meshes?
User avatar
Stephanie I
 
Posts: 3357
Joined: Thu Apr 05, 2007 3:28 pm

Post » Thu Jul 15, 2010 1:04 am

Here's the conscribe log from a fresh game with an attempt to rotate an iron dagger:

Spoiler

processed uv ini file
UV Initialisation Complete
NifSE::NifSave - Saving registered nifs
NifSE::NifSave - Save complete.

rotating weapon
weaponloc is -1.00
NifSE::NifOpen - "Weapons\Iron\Dagger.NIF" opened for editing.
NifSE::NifFile c'tor - NifFile created for editing.
NifSE::NifFile.setRoot - Setting root to root of "Weapons\Iron\Dagger.NIF"!
NifSE::CheckFileLocation - File "Weapons\Iron\Dagger.NIF" found in BSA!
NifSE::GetNifStream - Successfully read nif data in BSA "C:\Games\Oblivion\Data\Oblivion - Meshes.bsa". Buffer length is 50216.
NifSE::NifFile.setRoot - Nif read from stream of file "Weapons\Iron\Dagger.NIF".
NifSE::NifFile.setRoot - Nif is good; "INVALID VERSION" (4294967294). Loaded 3 ExtraData nodes, collision, 2 Children nodes, and 0 Effects nodes.
NifSE::NifFile.reg - Registering "Weapons\Iron\Dagger.NIF" on RegList.
NifSE::NifFile.reg - Registered as #4-0.
NifSE::NifOpen - "Weapons\Iron\Dagger.NIF" registered as #4-0.

NifSE::NifGetNumChildren - Getting number of Children nodes in nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNumChildren - Returning 2 Children nodes.

NifSE::NifGetNumChildren - Getting number of Children nodes in nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNumChildren - Returning 2 Children nodes.

NifSE::NifGetNthChildLocalRotation - Getting local Rotation of Child #0 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNthChildLocalRotation - Returning child's local rotation.

Element (0, 0) is 1.
Element (0, 1) is 0.
Element (0, 2) is 0.
Element (1, 0) is 0.
Element (1, 1) is -1.
Element (1, 2) is 8.74228e-008.
Element (2, 0) is 0.
Element (2, 1) is -8.74228e-008.
Element (2, 2) is -1.
Returning product.
| +1.000 +0.000 +0.000 |
| +0.000 -1.000 +0.000 |
| +0.000 -0.000 -1.000 |
NifSE::NifSetNthChildLocalRotation - Setting local Rotation of Child #0 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifSetNthChildLocalRotation - Local Rotation of Child #0 of nif #4-0 has been set.

NifSE::NifGetNthChildLocalRotation - Getting local Rotation of Child #1 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifGetNthChildLocalRotation - Returning child's local rotation.

Element (0, 0) is 1.
Element (0, 1) is 0.
Element (0, 2) is 0.
Element (1, 0) is 0.
Element (1, 1) is -1.
Element (1, 2) is 8.74228e-008.
Element (2, 0) is 0.
Element (2, 1) is -8.74228e-008.
Element (2, 2) is -1.
Returning product.
| +1.000 +0.000 +0.000 |
| +0.000 -1.000 +0.000 |
| +0.000 -0.000 -1.000 |
NifSE::NifSetNthChildLocalRotation - Setting local Rotation of Child #1 of nif #4-0
NifSE::getRegNif - Finding nif registered as #4-0.
NifSE::getRegNif - Nif #4-0 found.
NifSE::getRegNif - Nif root is good.
NifSE::NifSetNthChildLocalRotation - Local Rotation of Child #1 of nif #4-0 has been set.

Done rotating new weapon
qqq
Bye.


HeX

That's... bizarre. That matrix matches exactly what mine had. And it's being set correctly. You sure the mesh was reloaded? That log doesn't show the CreateNif log, which would imply it wasn't.

I'm sorry to interrupt. Quick question.
Can NifSE provide a means to alter the texture associated with a mesh or it only works with item meshes?

Yes, it can, though there's some more I could do with that. What do you want to use it for?
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

PreviousNext

Return to IV - Oblivion