blender
plantimager.blender Link
Camera Link
Camera(scene, data, hdri_enabled=False)
Source code in plantimager/blender.py
188 189 190 191 192 193 194 195 196 197 |
|
set_intrinsics Link
set_intrinsics(width, height, focal)
:input w image width :input h image height :input f focal length (equiv. 35mm)
Source code in plantimager/blender.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
|
MultiClassObject Link
MultiClassObject(scene, data)
Source code in plantimager/blender.py
328 329 330 331 332 333 334 |
|
load_obj Link
load_obj(fname, dx=None, dy=None, dz=None, colorize=True, palette_location=None)
move object by dx, dy, dz if specified
Source code in plantimager/blender.py
383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
|
_get_log_filepath Link
_get_log_filepath(path)
Returns a path for the blender log file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
A file path or directory to use as blender log file location. |
required |
Returns:
Type | Description |
---|---|
str
|
The blender log file path. |
Source code in plantimager/blender.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
check_engine Link
check_engine(engine='CYCLES')
Check the rendering engine.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
engine
|
(CYCLES, BLENDER_EEVEE, BLENDER_WORKBENCH)
|
The name of the rendering engine to use.
Defaults to |
"CYCLES"
|
Source code in plantimager/blender.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
clean_mesh Link
clean_mesh(fname, out)
Mesh cleaning function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fname
|
str
|
The file path to the mesh object to load in Blender. |
required |
out
|
str
|
The file path to us to export the cleaned mesh object. |
required |
Source code in plantimager/blender.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
load_obj Link
load_obj(fname, log=None)
Load a mesh in Blender.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fname
|
str
|
The file path to the mesh object to load in Blender. |
required |
log
|
str
|
The blender log file path. |
None
|
Source code in plantimager/blender.py
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 |
|
split_by_material Link
split_by_material(fname, out, material_class_corres)
Mesh splitting function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fname
|
str
|
The file path to the mesh object to load in Blender. |
required |
out
|
str
|
The file path to us to export the cleaned mesh object. |
required |
material_class_corres
|
dict
|
A renaming dictionary, map LPY class names to semantic class names. |
required |
Source code in plantimager/blender.py
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|