Detecting in C++ when editor is open during render.
by Demolishun · in Torque 3D Professional · 01/07/2013 (11:45 pm) · 4 replies
Okay, I have been searching through the source. I cannot find the flag/test used to determine in an object when the editor is open. I want to know when it is open so I can tell an object to render differently. Basically I don't want it to render at all unless the editor is open.
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67
#2
Thanks, that got me pointed in the right direction:
Also there are SimObject callbacks on the RootGroup in C++ (I assume this the MissionGroup?):
Plus additional console commands (TS):
01/08/2013 (2:15 am)
@dB,Thanks, that got me pointed in the right direction:
// put this in your .cpp file that needs access to the editor state
extern bool gEditingMission;
...
// then make a decision
if(!gEditingMission)
return;Also there are SimObject callbacks on the RootGroup in C++ (I assume this the MissionGroup?):
onEditorEnable(); editorDisabled();
Plus additional console commands (TS):
editorEnabled(); editorDisabled(); isEditorEnabled();
#3
01/08/2013 (11:08 am)
Whoops, sorry, was posting off the top of my head, and sure that was the variable name!
#4
I think the variable changed at some point after reading the comments. You sent me the right direction because I searched for the gEditorEnabled and found the comment talking about that along with the names of the new stuff. So you did a good job!
01/08/2013 (4:06 pm)
@dB,I think the variable changed at some point after reading the comments. You sent me the right direction because I searched for the gEditorEnabled and found the comment talking about that along with the names of the new stuff. So you did a good job!
Torque Owner Daniel Buckmaster
T3D Steering Committee