ΠΠ· ΡΠΊΡΠΈΠΏΡΠ° ΡΡ ΠΌΠΎΠΆΠ΅ΡΡ ΠΏΠΎΠ»ΡΡΠ°ΡΡ Π΄Π°Π½Π½ΡΠ΅ ΠΎ Π½Π°ΠΆΠΈΠΌΠ°Π΅ΠΌΡΡ ΠΊΠ»Π°Π²ΠΈΡΠ°Ρ Π½Π° ΠΊΠ»Π°Π²ΠΈΠ°ΡΡΡΠ΅, ΡΠ΅Π»ΡΠΊΠ°Ρ ΠΌΡΡΠΈ ΠΈΠ»ΠΈ ΡΡΠΈΠ»ΡΡΠ° ΠΈ ΡΠ΅Π°Π³ΠΈΡΠΎΠ²Π°ΡΡ Π½Π° Π½ΠΈΡ Π½ΡΠΆΠ½ΡΠΌ ΡΠ΅Π±Π΅ ΡΠΏΠΎΡΠΎΠ±ΠΎΠΌ. ΠΠ°ΠΊ ΡΡΠΎ ΡΠ΄Π΅Π»Π°ΡΡ?
ΠΡΠΎΡΡΠΎΠΉ ΠΏΡΠΈΠΌΠ΅Ρ:
// Π΄ΠΎΡΡΡΠΏ ΠΊ ΠΎΡΠ»Π°Π΄ΠΊΠ΅
Debug dbg;
DebugLog log = dbg.log();
void main() {
// ΠΎΡΠΈΡΠ°Π΅ΠΌ Π»ΠΎΠ³-ΡΠ°ΠΉΠ»
log.clear();
for( int i = 0; i < 1000; i++ ) {
float x = GetMouseX();
float y = GetMouseY();
// ΠΏΠ΅ΡΠ°ΡΠ°Π΅ΠΌ Π² Π»ΠΎΠ³-ΡΠ°ΠΉΠ» ΠΊΠΎΠΎΡΠ΄ΠΈΠ½Π°ΡΡ ΠΌΡΡΠΈ ΠΊΠ°ΠΆΠ΄ΡΠ΅ 50 ΠΌΡ
log += "mouse coord " + x + " " + y;
Wait( 50 );
}
}
Π§ΡΠΎΠ±Ρ ΡΠ²ΠΈΠ΄Π΅ΡΡ, ΡΡΠΎ ΠΆΠ΅ Π½Π°ΠΏΠ΅ΡΠ°ΡΠ°Π»ΠΎΡΡ Π² Π»ΠΎΠ³, Π²ΡΠ±Π΅ΡΠΈ Π² ΠΌΠ΅Π½Ρ 3DCoat "Π‘ΠΊΡΠΈΠΏΡΡ / ΠΠΎΡΠΌΠΎΡΡΠ΅ΡΡ ΠΆΡΡΠ½Π°Π» Π²ΡΠΏΠΎΠ»Π½Π΅Π½ΠΈΡ".
ΠΠΎΡΠΌΠΎΡΡΠΈ ΠΈ Π½Π° ΡΡΠΈ ΡΡΠ½ΠΊΡΠΈΠΈ:
// Get current mouse coordinate X.
DEPRECATED float GetMouseX()
// Get current mouse coordinate Y.
DEPRECATED float GetMouseY()
// Get pen pressure.
DEPRECATED float GetPressure()
// Check if LMB pressed.
DEPRECATED bool LMBPressed()
// Check if RMB pressed.
DEPRECATED bool RMBPressed()
// Check if MMB pressed.
DEPRECATED bool MMBPressed();
// Get visible (in screen projection) radius of the brush.
DEPRECATED float GetVisiblePenRadius();
// Start drawing stroke at point (x,y) with some pressure.
// \param Pressure In diapason [ 0.0 (without pressure); 1.0 (maximum pressure) ].
DEPRECATED void StartStroke(float x,float y,float Pressure)
// Draw stroke to point (x,y) with some pressure.
// \param Pressure In diapason [ 0.0 (without pressure); 1.0 (maximum pressure) ].
DEPRECATED void DrawStrokeTo(float x,float y,float Pressure)
// After that command stroke will be actually drawn.
// Set of commands StartStroke. DrawStrokeTo should be
// terminated by EndStroke.
DEPRECATED void EndStroke()
// True when object presents by ray (x,y).
DEPRECATED bool ScreenRayPicksObject(float x,float y)
// Was widget with identifier ID recently (within last Time sec) pressed?
DEPRECATED bool WasRecentlyPressed(string &in ID,float Time);
// Was widget with identifier ID recently (within last Time sec)
// pressed via RMB?
DEPRECATED bool WasRecentlyRMBPressed(string &in ID,float Time);
// Is user in tool identified as ID? To get current tool
// identifier press RMB + MMB over empty field.
DEPRECATED bool IsInTool(string &in ToolID);
// Get active tool ID.
DEPRECATED string GetCurrentToolID ();
// Get time (sec) since script started.
DEPRECATED float GetTimeSinceStart();