Commit 5a8f7d5
authored
More flexibility in pointcloud_search/get retrieval (#752)
In the default RendererServices implementation of retrieving data from
point clouds via Partio, there had to be an exact match between the
attribute type of the point cloud file (as understood by Partio) and the
element type of the OSL array used to store the retrieved data.
Because OSL doesn't support 2D arrays, that means that you could retrieve
only data of the main non-array OSL types: int, float, 3-float (color,
point, vector, normal etc.).
But we had somebody create a point cloud that stored float[4] to store
quaternions (don't ask), and then was unable to retrieve it from OSL,
because there is no float[4] type.
So the solution is that we are loosening the type matching tests.
Simply stated, it's willing to match either a float or a float[n] in the
point cloud, when retrieving into a float array in OSL. If it's a
float[n], it will just pack them contiguously into the OSL array of
floats, and it's up to the shader to know what's expected and to unpack
and interpret it properly. An error will be reported if there is not
enough room in the array provided.1 parent 75b475c commit 5a8f7d5
3 files changed
Lines changed: 91 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4337 | 4337 | | |
4338 | 4338 | | |
4339 | 4339 | | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
4340 | 4349 | | |
4341 | 4350 | | |
4342 | 4351 | | |
| |||
4370 | 4379 | | |
4371 | 4380 | | |
4372 | 4381 | | |
4373 | | - | |
| 4382 | + | |
| 4383 | + | |
4374 | 4384 | | |
4375 | | - | |
| 4385 | + | |
| 4386 | + | |
4376 | 4387 | | |
| 4388 | + | |
| 4389 | + | |
| 4390 | + | |
| 4391 | + | |
| 4392 | + | |
| 4393 | + | |
| 4394 | + | |
| 4395 | + | |
4377 | 4396 | | |
4378 | 4397 | | |
4379 | 4398 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2594 | 2594 | | |
2595 | 2595 | | |
2596 | 2596 | | |
2597 | | - | |
2598 | | - | |
2599 | | - | |
2600 | | - | |
2601 | 2597 | | |
2602 | 2598 | | |
2603 | 2599 | | |
| |||
2688 | 2684 | | |
2689 | 2685 | | |
2690 | 2686 | | |
2691 | | - | |
| 2687 | + | |
2692 | 2688 | | |
2693 | 2689 | | |
2694 | 2690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
168 | 169 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 170 | + | |
173 | 171 | | |
174 | 172 | | |
175 | 173 | | |
176 | 174 | | |
177 | | - | |
178 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
179 | 203 | | |
| 204 | + | |
180 | 205 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
185 | 223 | | |
| 224 | + | |
186 | 225 | | |
187 | 226 | | |
188 | | - | |
189 | 227 | | |
190 | 228 | | |
191 | 229 | | |
| |||
308 | 346 | | |
309 | 347 | | |
310 | 348 | | |
311 | | - | |
| 349 | + | |
312 | 350 | | |
313 | 351 | | |
314 | 352 | | |
315 | 353 | | |
316 | 354 | | |
317 | | - | |
| 355 | + | |
318 | 356 | | |
319 | 357 | | |
320 | 358 | | |
321 | 359 | | |
322 | 360 | | |
323 | 361 | | |
324 | | - | |
| 362 | + | |
325 | 363 | | |
326 | 364 | | |
327 | 365 | | |
328 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
329 | 369 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | 370 | | |
346 | 371 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
351 | 375 | | |
352 | 376 | | |
353 | 377 | | |
354 | | - | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
355 | 387 | | |
356 | 388 | | |
357 | 389 | | |
| |||
0 commit comments