-
Notifications
You must be signed in to change notification settings - Fork 0
/
Quartier.ms
114 lines (77 loc) · 3.32 KB
/
Quartier.ms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/*#########################################################################################################################
Christophe Pages (http://www.c-pages.fr)
##########################################################################################################################
URBA - BATIMENT
Générateur de batiment procédurale pour utilisation avec générateur de ville procédurale
QUARTIER - le plugin
########################################################################################################################*/
------------ Declaration de variables global --------------
--- pour le display dans le viewport ---
unregisterRedrawViewsCallback urba_fn_afficherContours
-- unregisterRedrawViewsCallback urba_fn_afficherTypologie
global urba_fn_afficherContours --*, urba_fn_afficherTypologie
--------------- le plug in ---------
plugin geometry Urba_quartier
name:"Quartier"
classID:#(643585,464251)
category:"CP | Urba"
extends:Editable_poly
replaceUI:true
version:0
(
------------ DEBUG -------------------------------------------------------------------------------------------------------------------------
local m_debug = true
local m_dbgPrefix ="urba | Quartier Plg"
fn debug _txt var: param: =(
try if m_debug do ::debuger _txt var:var param:param prefix:m_dbgPrefix
catch ()
)
--------------- IMPORTS ----------------------------------------------------------------------------------------------------------------------
include "$userScripts\cp-Urba\Modules\Quartier\Quartier - Core.ms"
--------------- CORE ----------------------------------------------------------------------------------------------------------------------
local core = str_quartier_core ()
--------------- PARAMETRES et ROLLOUTS ----------------------------------------------------------------------------------------------------------------------
local roll_contours, roll_typologies, roll_param_typologie
---- on importe les parametres -----
include "$userScripts\\cp-Urba\\modules\\Quartier\\Quartier - Parametres.ms"
---- on importe les rollouts -----
include "$userScripts\\cp-Urba\\modules\\Quartier\\Quartier - rollout.ms"
include "$userScripts\\cp-Urba\\modules\\Commun\\Urba - rollout - A propos.ms"
--------------- FONCTIONS ----------------------------------------------------------------------------------------------------------------------
fn initialiser doLogo:false =(
core.initialiser this
)
fn actualiser =(
core.actualiser ()
)
fn actualiser_rollouts = (
roll_contours.actualiser ()
roll_typologies.actualiser ()
)
--------------- CREATION ----------------------------------------------------------------------------------------------------------------------
tool create (
on mousePoint click do (
nodeTM.translation = worldPoint
core.actualiser ()
#stop
)
) --- fin tool create ------------
--------------- EVENEMENTS ----------------------------------------------------------------------------------------------------------------------
on load do (
debug "load du plugin"
initialiser ()
)
on clone _original do (
initialiser ()
)
on create do (
debug "creation du plugin"
initialiser ()
actualiser ()
)
on update do (
debug "update du plugin"
debug "shape : " var:surface_node
initialiser ()
)
)