LayerColor class¶
Bases: pytvpaint.utils.Refreshable
The color of a layer identified by an index. Layer colors are specific to a clip.
Construct a LayerColor from an index and a clip (if None it gets the current clip).
Source code in pytvpaint/layer.py
219 220 221 222 223 224 225 226 227 228 229 230 | |
index: int
property
¶
The layer color index.
clip: Clip
property
¶
The layer color clip.
is_visible: bool
property
¶
Get the visibility of the color index.
refresh_on_call = True
instance-attribute
¶
refresh() -> None
¶
Refreshes the layer color data.
Source code in pytvpaint/layer.py
232 233 234 235 236 | |
name(value: str) -> None
¶
Set the name of the color.
Source code in pytvpaint/layer.py
263 264 265 266 267 268 269 | |
color(value: george.RGBColor) -> None
¶
Set the color value.
Source code in pytvpaint/layer.py
280 281 282 283 | |
lock_layers(lock: bool) -> None
¶
Lock or unlock all layers with this color.
Source code in pytvpaint/layer.py
291 292 293 294 295 296 297 | |
show_layers(show: bool, mode: george.LayerColorDisplayOpt = george.LayerColorDisplayOpt.DISPLAY) -> None
¶
Show or hide layers with this color.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
show
|
bool
|
whether to show the layers using this color or not |
required |
mode
|
pytvpaint.george.LayerColorDisplayOpt
|
the display mode. Defaults to george.LayerColorDisplayOpt.DISPLAY. |
pytvpaint.george.LayerColorDisplayOpt.DISPLAY
|
Source code in pytvpaint/layer.py
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
select_layers(select: bool) -> None
¶
Select or unselect layers with this color.
Source code in pytvpaint/layer.py
316 317 318 319 320 321 322 | |