3ds Max C++ API Reference
Loading...
Searching...
No Matches
MAXScript_TLS.h File Reference

Classes

struct  MAXScript_TLS

Macros

#define def_thread_local(type, lcl, init_on_reset, init_val)
#define thread_local(x)
#define MAXScript_time()
#define MAXScript_time_tls()

Functions

void needs_redraw_set (MAXScript_TLS *tls=nullptr)
void needs_complete_redraw_set (MAXScript_TLS *tls=nullptr)
void needs_redraw_clear (MAXScript_TLS *tls=nullptr)
void alloc_thread_locals ()
ScripterExport void init_thread_locals ()
void free_thread_locals ()
void copy_thread_locals (MAXScript_TLS *source, MAXScript_TLS *target)

Variables

ScripterExport int thread_locals_index
int thread_id_index
MAXScript_TLSMAXScript_TLS_list

Macro Definition Documentation

◆ def_thread_local

#define def_thread_local ( type,
lcl,
init_on_reset,
init_val )
Value:
type lcl

◆ thread_local

#define thread_local ( x)
Value:
(((MAXScript_TLS*)TlsGetValue(thread_locals_index))->x)
ScripterExport int thread_locals_index
controller mat max min numsubs x z controller keys x z controller keys x
Definition generics.inl:212
Definition MAXScript_TLS.h:34

◆ MAXScript_time

#define MAXScript_time ( )
Value:
(thread_local(use_time_context) ? thread_local(current_time) : GetCOREInterface()->GetTime())
virtual TimeValue GetTime()=0
CoreExport Interface * GetCOREInterface()
77#define MAXScript_time() \
78 (thread_local(use_time_context) ? thread_local(current_time) : GetCOREInterface()->GetTime())

◆ MAXScript_time_tls

#define MAXScript_time_tls ( )
Value:
(_tls->use_time_context ? _tls->current_time : GetCOREInterface()->GetTime())
82#define MAXScript_time_tls() \
83 (_tls->use_time_context ? _tls->current_time : GetCOREInterface()->GetTime())

Function Documentation

◆ needs_redraw_set()

void needs_redraw_set ( MAXScript_TLS * tls = nullptr)
inline
56{
57 if (tls == nullptr)
58 tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index);
59 if (tls->redraw_mode && tls->needs_redraw == 0)
60 tls->needs_redraw = 1;
61}

◆ needs_complete_redraw_set()

void needs_complete_redraw_set ( MAXScript_TLS * tls = nullptr)
inline
63{
64 if (tls == nullptr)
65 tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index);
66 if (tls->redraw_mode)
67 tls->needs_redraw = 2;
68}

◆ needs_redraw_clear()

void needs_redraw_clear ( MAXScript_TLS * tls = nullptr)
inline
71{
72 if (tls == nullptr)
73 tls = (MAXScript_TLS*)TlsGetValue(thread_locals_index);
74 tls->needs_redraw = 0;
75}

◆ alloc_thread_locals()

void alloc_thread_locals ( )

◆ init_thread_locals()

ScripterExport void init_thread_locals ( )

◆ free_thread_locals()

void free_thread_locals ( )

◆ copy_thread_locals()

void copy_thread_locals ( MAXScript_TLS * source,
MAXScript_TLS * target )

Variable Documentation

◆ thread_locals_index

ScripterExport int thread_locals_index
extern

◆ thread_id_index

int thread_id_index
extern

◆ MAXScript_TLS_list

MAXScript_TLS* MAXScript_TLS_list
extern