Mod Tool: Difference between revisions

58 bytes removed ,  6 September 2012
m
no edit summary
mNo edit summary
mNo edit summary
Line 292: Line 292:
|-
|-
| [25] getting and setting the position of points (without selection)
| [25] getting and setting the position of points (without selection)
|
| [26] getting the rotation and position of selected objects
|
| [27] getting the rotation and position of not selected objects
|}
|}


Line 638: Line 638:
  oObj & ".kine.local.posz", 1, , , , True
  oObj & ".kine.local.posz", 1, , , , True


' '''[26] getting the rotation and position of selected objects'''
logmessage "mesh name: " & selection(0)
logmessage selection(0).rotx.value
logmessage selection(0).roty.value
logmessage selection(0).rotz.value
logmessage selection(0).posx.value
logmessage selection(0).posy.value
logmessage selection(0).posz.value
' '''[27] getting the rotation and position of not selected objects'''
' GetValue("NAME.kine.global.rotx")
' NAME must be the exact mesh name
' let's say you want the data of one chracter's pelvis
logmessage GetValue("pelvis.kine.global.rotx")
logmessage GetValue("pelvis.kine.global.roty")
logmessage GetValue("pelvis.kine.global.rotz")
logmessage GetValue("pelvis.kine.global.posx")
logmessage GetValue("pelvis.kine.global.posy")
logmessage GetValue("pelvis.kine.global.posz")




Line 655: Line 678:


* Oni to ModTool
* Oni to ModTool
** conversion of oni to xml [-]
** conversion of oni to xml
** import of TV collection [done]
** import of TV collection [done]
** adding a new TV [done]
** adding a new TV [done]
Line 688: Line 711:


=====hierarchy builder for characters=====
=====hierarchy builder for characters=====
{| border=0 cellpadding=0 align=right
| hierarchy breaker beta<br>[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hierarchy_breaker_beta.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/3D_modding/hierarchy_breaker_beta_tn.png]
|}
(Automatic rigging.) Maybe null objects could stand for the centers of body parts. Then one click and the real centers gets positioned. The [[User:Paradox-01/for_WIP_pages#Mod_Tool:_putting_a_character_together_while_preserving_body_part_positions|rotations are known]] and the names would lead to the correct hierarchy.
(Automatic rigging.) Maybe null objects could stand for the centers of body parts. Then one click and the real centers gets positioned. The [[User:Paradox-01/for_WIP_pages#Mod_Tool:_putting_a_character_together_while_preserving_body_part_positions|rotations are known]] and the names would lead to the correct hierarchy.


In order to make edits there is also a need of destroying the hierarchy again. Child object need the rotation of the parent and get cut. I'm not yet sure if the values needs to be subtracted, added or something else.
In order to make edits there is also a need of destroying the hierarchy again while preserving the rotation and position of the meshes.




Line 697: Line 724:


hierarchy breaker
hierarchy breaker
 
* [https://dl.dropbox.com/u/139715/OniGalore/ModToolScript/hierarchy_breaker_beta.txt hierarchy_breaker_beta.txt] (works only with strict correct names)
step 1: getting a starting point (in this case the pelvis)
 
'SelectNeighborObj [parameter1], [parameter2], [parameter3], [parameter4]
'options of the second parameters
'0 go one level up
'1 go one level down
'2 go to next silbing
'3 go to previous silbing
'4 go to highest level
'5 go to deepest level
if selection.count > 0 then
' user could have selected anything, let's find the pelvis
' check current obj, if it isn't the pelvis go one level up
do until instr(1, current_obj, "pelvis") = 1 or not_found = 1
previous_obj = current_obj
current_obj = selection(0)
if instr(1, selection(0), "pelvis") = 1 then
logmessage "found pelvis"
end if
if previous_obj = current_obj then
not_found = 1
logmessage "couldn't find pelvis"
msgbox "Make sure that the pelvis object holds the word ""pelvis""."  & vbCRLF & "It must be part of the name.", , "error"
else
' we work with selection here, so first parameter is optional and can be left out
' the second parameter is 0 by default so we can also left it out
' SelectNeighborObj [parameter1], [parameter2]
SelectNeighborObj
end if
loop
else
  msgbox "One part of your character must be selected.", , "error"
end if
 
step 2: getting the names, positions and rotations of all body parts and apply value to null refs
 
step 3: destroying the hierarchy




hierarchy builder
hierarchy builder
 
* [...]
[...]




[[Category:Windows-only modding tools]]
[[Category:Windows-only modding tools]]
8,452

edits