Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
I am trying to manipulate a scene node that I created in the OS3D editor from custom code.
On the scene tree, I see:
danremappedlowpoly25 #8
If I open a setposition dialog, I see:
8.danremappedlowpoly25
If I use:
let V3DgetObjectByName c3dXsession "8.danremappedlowpoly25" -> nodetoget in
let V3DgetSession c3dXsession-> scene_structure in
let SO3ObjectGetName nodetoget-> nodename in
or
let V3DgetObjectByName c3dXsession "danremappedlowpoly25 #8" -> nodetoget in
let V3DgetSession c3dXsession-> scene_structure in
let SO3ObjectGetName nodetoget-> nodename in
, the code following the let statements that seeks to display nodename as a string fails to execute. Am I getting the scene node name right? Scol doesn't find any errors in the code at compile time. It's only when I try to run the scene in question that the function bloc cbShow fails to execute.
Here is the entire function fwiw:
fun cbShow(inst, from, action, param, reply, constr)=
let (V3DgetSessionView c3dXsession) -> viewstr in
let viewstr.V3D_win -> fatherwin in
// fatherwin the ObjWin used to create the 3d buffer
set parent_chat_window = _CRwindow _channel fatherwin 0 450 800 150 WN_NOBORDER|WN_CHILDINSIDE "A window";
set hacker_window_object_container= _CRcontainerFromObjWin _channel parent_chat_window 0 0 800 150 CO_CHILDINSIDE 0x000000 "hackerwindow";
set hacker_font = _CRfont _channel 12 0 0 "Lucida Console";
set ongoing_chat_textfield = _CRcompText _channel hacker_window_object_container nil [0 0] OBJ_ENABLE|OBJ_VISIBLE|CT_LEFT|CT_LABEL|CT_WORDWRAP|CT_LABEL|CT_SELECT OBJ_CONTAINER_KEYDOWN 800 100 strcat "hacker window chat text field" "\n" hacker_font [0x00FFFF 0 0 0xFFFF00] [0xFFFFFF 50] nil nil;
set chat_entry_textfield = _CRcompText _channel hacker_window_object_container nil [0 101] OBJ_ENABLE|OBJ_VISIBLE|CT_LEFT|CT_WORDWRAP|CT_EDITLINE 0 800 50 "hacker entry field" hacker_font [0x00FFFF 0 0 0xFFFF00] [0xFFFFFF 50] nil nil;
_PAINTcontainer hacker_window_object_container;
//callback for when user hits the enter key after entering chat string
_CBcompTextValidation chat_entry_textfield @localuser_enter_text nil CT_VALIDENTER;
_CBcontainerKeyDown hacker_window_object_container @containerkeydown nil;
//section to create window to hold ongoing stream of transform information for remote avatars
//set remote_avatar_transform_window =_CRwindow _channel nil 500 100 400 300 WN_MENU|WN_MINBOX "Avatar Transform Data";
set remote_avatar_transform_field = _CRtext _channel remote_avatar_transform_window 0 0 400 250 ET_AVSCROLL|ET_ALIGN_LEFT|ET_VSCROLL|ET_TABFOCUS|ET_DOWN "";
//timer to send positionn and orientation of walkthrough scenenode to server
_rfltimer _starttimer _channel 2500 @send_client_avatar_position_and_rotation_to_room "myparam";
loadman;
intialize_Remote_bot_list;
if ((netThisUser plugchatvariable.CHAT_netcomm) !=nil)
then
//open then brace
(
let netThisId plugchatvariable.CHAT_netcomm-> userid in
let V3DgetObjectByName c3dXsession "8.danremappedlowpoly25" -> nodetoget in
let V3DgetSession c3dXsession-> scene_structure in
let SO3ObjectGetName nodetoget-> nodename in
//
(
_ADDcompText ongoing_chat_textfield strcatn "your user id name is "::(itoa userid)::" and you are now connected.and one of the nodes creted with the editor is " :: nodename ::" "::"\n"::nil hacker_font [0x00FFFF 0 0 0xFFFF00] CT_END;
_PAINTcontainer hacker_window_object_container;
bot_list_size Remote_bot_List 0;
0;
);
0;
)
else
(
0;
);
0;;
Last edited by hebdemnobad (26-Dec-2013 23:45:06)
Offline
the name of a scene node is what you see in the setposition and other dialogs that open up when you right-click the scene tree
Offline
real node names are id.name, so 8.danremappedlowpoly25
other name #id are used to make the search by name easier in the UI.
Offline