Houdini Engine 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HAPI.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * Produced by:
7  * Side Effects Software Inc
8  * 123 Front Street West, Suite 1401
9  * Toronto, Ontario
10  * Canada M5J 2M2
11  * 416-504-9876
12  *
13  * COMMENTS:
14  * For parsing help, there is a variable naming convention we maintain:
15  * strings: char * and does not end in "buffer"
16  * binary: char * and is either exactly "buffer" or ends
17  * with "_buffer"
18  * single values: don't end with "_array" or "_buffer"
19  * arrays: <type> * and is either "array" or ends
20  * with "_array"
21  * array length: is either "length", "count", or ends with
22  * "_length" or "_count"
23  */
24 
25 #ifndef __HAPI_h__
26 #define __HAPI_h__
27 
28 #include "HAPI_API.h"
29 #include "HAPI_Common.h"
30 #include "HAPI_Helpers.h"
31 
32 // SESSION ------------------------------------------------------------------
33 
34 /// @brief Creates a new in-process session. There can only be
35 /// one such session per host process.
36 ///
37 /// @param[out] session
38 /// A ::HAPI_Session struct to receive the session id,
39 /// in this case always 0.
40 ///
42 
43 /// @brief Starts a Thrift RPC server process on the local host serving
44 /// clients on a TCP socket and waits for it to start serving.
45 /// It is safe to create an RPC session on local host using the
46 /// specified port after this call succeeds.
47 ///
48 /// @param[in] auto_close
49 /// Close the server automatically when all clients
50 /// disconnect from it.
51 ///
52 /// @param[in] timeout_ms
53 /// Timeout in milliseconds for waiting on the server to
54 /// signal that it's ready to serve. If the server fails
55 /// to signal within this time interval, the call fails
56 /// and the server process is terminated.
57 ///
58 /// @param[in] port
59 /// The TCP socket to create on the server.
60 ///
61 /// @param[out] process_id
62 /// The process id of the server, if started successfully.
63 ///
65  int port,
66  float timeout_ms,
67  HAPI_ProcessId * process_id );
68 
69 /// @brief Creates a Thrift RPC session using a TCP socket as transport.
70 ///
71 /// @param[out] session
72 /// A ::HAPI_Session struct to receive the session id,
73 /// in this case always 0.
74 ///
75 /// @param[in] host_name
76 /// The name of the server host.
77 ///
78 /// @param[in] port
79 /// The server port to connect to.
80 ///
82  const char * host_name,
83  int port );
84 
85 /// @brief Starts a Thrift RPC server process on the local host serving
86 /// clients on a Windows named pipe or a Unix domain socket and
87 /// waits for it to start serving. It is safe to create an RPC
88 /// session using the specified pipe or socket after this call
89 /// succeeds.
90 ///
91 /// @param[in] auto_close
92 /// Close the server automatically when all clients
93 /// disconnect from it.
94 ///
95 /// @param[in] timeout_ms
96 /// Timeout in milliseconds for waiting on the server to
97 /// signal that it's ready to serve. If the server fails
98 /// to signal within this time interval, the call fails
99 /// and the server process is terminated.
100 ///
101 /// @param[in] pipe_name
102 /// The name of the pipe or socket.
103 ///
104 /// @param[out] process_id
105 /// The process id of the server, if started successfully.
106 ///
108  const char * pipe_name,
109  float timeout_ms,
110  HAPI_ProcessId * process_id );
111 
112 /// @brief Creates a Thrift RPC session using a Windows named pipe
113 /// or a Unix domain socket as transport.
114 ///
115 /// @param[out] session
116 /// A ::HAPI_Session struct to receive the session id,
117 /// in this case always 0.
118 ///
119 /// @param[in] pipe_name
120 /// The name of the pipe or socket.
121 ///
123  const char * pipe_name );
124 
125 /// @brief Binds a new implementation DLL to one of the custom session
126 /// slots.
127 ///
128 /// @param[in] session_type
129 /// Which custom implementation slot to bind the
130 /// DLL to. Must be one of ::HAPI_SESSION_CUSTOM1,
131 /// ::HAPI_SESSION_CUSTOM2, or ::HAPI_SESSION_CUSTOM3.
132 ///
133 /// @param[in] dll_path
134 /// The path to the custom implementation DLL.
135 ///
137  const char * dll_path );
138 
139 /// @brief Creates a new session using a custom implementation.
140 /// Note that the implementation dll must already have
141 /// been bound to the session via calling
142 /// ::HAPI_BindCustomImplementation().
143 ///
144 /// @param[in] session_type
145 /// session_type indicates which custom session
146 /// slot to create the session on.
147 ///
148 /// @param[in,out] session_info
149 /// Any data required by the custom implementation to
150 /// create its session.
151 ///
152 /// @param[out] session
153 /// A ::HAPI_Session struct to receive the session id,
154 /// The sessionType parameter of the struct should
155 /// also match the session_type parameter passed in.
156 ///
158  void * session_info,
159  HAPI_Session * session );
160 
161 /// @brief Checks whether the session identified by ::HAPI_Session::id is
162 /// a valid session opened in the implementation identified by
163 /// ::HAPI_Session::type.
164 ///
165 /// @param[in] session
166 /// The ::HAPI_Session to check.
167 ///
168 /// @return ::HAPI_RESULT_SUCCESS if the session is valid.
169 /// Otherwise, the session is invalid and passing it to
170 /// other HAPI calls may result in undefined behavior.
171 ///
172 HAPI_DECL HAPI_IsSessionValid( const HAPI_Session * session );
173 
174 /// @brief Closes a session. If the session has been established using
175 /// RPC, then the RPC connection is closed.
176 ///
177 /// @param[in] session
178 /// The HAPI_Session to close. After this call, this
179 /// session is invalid and passing it to HAPI calls other
180 /// than ::HAPI_IsSessionValid() may result in undefined
181 /// behavior.
182 ///
183 HAPI_DECL HAPI_CloseSession( const HAPI_Session * session );
184 
185 // INITIALIZATION / CLEANUP -------------------------------------------------
186 
187 /// @brief Check whether the runtime has been initialized yet using
188 /// ::HAPI_Initialize(). Function will return ::HAPI_RESULT_SUCCESS
189 /// if the runtime has been initialized and ::HAPI_RESULT_FAILURE
190 /// otherwise.
191 ///
192 /// @param[in] session
193 /// The session of Houdini you are interacting with.
194 /// See @ref HAPI_Sessions for more on sessions.
195 /// Pass NULL to just use the default in-process session.
196 ///
197 HAPI_DECL HAPI_IsInitialized( const HAPI_Session * session );
198 
199 /// @brief Create the asset manager, set up environment variables, and
200 /// initialize the main Houdini scene. No license checking is
201 /// during this step. Only when you try to load an asset library
202 /// (OTL) do we actually check for licenses.
203 ///
204 /// @param[in] session
205 /// The session of Houdini you are interacting with.
206 /// See @ref HAPI_Sessions for more on sessions.
207 /// Pass NULL to just use the default in-process session.
208 ///
209 /// @param[in] cook_options
210 /// Global cook options used by subsequent default cooks.
211 /// This can be overwritten by individual cooks but if
212 /// you choose to instantiate assets with cook_on_load
213 /// set to true then these cook options will be used.
214 ///
215 /// @param[in] use_cooking_thread
216 /// Use a separate thread for cooking of assets. This
217 /// allows for asynchronous cooking and larger stack size.
218 ///
219 /// @param[in] cooking_thread_stack_size
220 /// Set the stack size of the cooking thread. Use -1 to
221 /// set the stack size to the Houdini default. This
222 /// value is in bytes.
223 ///
224 /// @param[in] otl_search_path
225 /// The directory where OTLs are searched for. You can
226 /// pass NULL here which will only use the default
227 /// Houdini OTL search paths. You can also pass in
228 /// multiple paths separated by a ";" on Windows and a ":"
229 /// on Linux and Mac. If something other than NULL is
230 /// passed the default Houdini search paths will be
231 /// appended to the end of the path string.
232 ///
233 /// @param[in] dso_search_path
234 /// The directory where generic DSOs (custom plugins) are
235 /// searched for. You can pass NULL here which will
236 /// only use the default Houdini DSO search paths. You
237 /// can also pass in multiple paths separated by a ";"
238 /// on Windows and a ":" on Linux and Mac. If something
239 /// other than NULL is passed the default Houdini search
240 /// paths will be appended to the end of the path string.
241 ///
242 /// @param[in] image_dso_search_path
243 /// The directory where image DSOs (custom plugins) are
244 /// searched for. You can pass NULL here which will
245 /// only use the default Houdini DSO search paths. You
246 /// can also pass in multiple paths separated by a ";"
247 /// on Windows and a ":" on Linux and Mac. If something
248 /// other than NULL is passed the default Houdini search
249 /// paths will be appended to the end of the path string.
250 ///
251 /// @param[in] audio_dso_search_path
252 /// The directory where audio DSOs (custom plugins) are
253 /// searched for. You can pass NULL here which will
254 /// only use the default Houdini DSO search paths. You
255 /// can also pass in multiple paths separated by a ";"
256 /// on Windows and a ":" on Linux and Mac. If something
257 /// other than NULL is passed the default Houdini search
258 /// paths will be appended to the end of the path string.
259 ///
260 /// [HAPI_Initialize]
261 HAPI_DECL HAPI_Initialize( const HAPI_Session * session,
262  const HAPI_CookOptions * cook_options,
263  HAPI_Bool use_cooking_thread,
264  int cooking_thread_stack_size,
265  const char * otl_search_path,
266  const char * dso_search_path,
267  const char * image_dso_search_path,
268  const char * audio_dso_search_path );
269 /// [HAPI_Initialize]
270 
271 /// @brief Set custom .env files. You MUST call this function just before
272 /// the HAPI_Initialize() call for it to take affect.
273 ///
274 /// @param[in] session
275 /// The session of Houdini you are interacting with.
276 /// See @ref HAPI_Sessions for more on sessions.
277 /// Pass NULL to just use the default in-process session.
278 ///
279 /// @param[in] houdini_environment_files
280 /// A list of paths, separated by a ";" on Windows and a ":"
281 /// on Linux and Mac, to .env files that follow the same
282 /// syntax as the houdini.env file in Houdini's user prefs
283 /// folder. These will be applied after the default
284 /// houdini.env file and will overwrite the process'
285 /// environment variable values. You an use this to enforce
286 /// a stricter environment when running engine.
287 /// For more info, see:
288 /// http://www.sidefx.com/docs/houdini/basics/config_env
289 ///
290 HAPI_DECL HAPI_SetEnvFiles( const HAPI_Session * session,
291  const char * houdini_environment_files );
292 
293 /// @brief Clean up memory. This will unload all assets and you will
294 /// need to call ::HAPI_Initialize() again to be able to use any
295 /// HAPI methods again.
296 ///
297 /// @note This does NOT release any licenses.
298 ///
299 /// @param[in] session
300 /// The session of Houdini you are interacting with.
301 /// See @ref HAPI_Sessions for more on sessions.
302 /// Pass NULL to just use the default in-process session.
303 ///
304 HAPI_DECL HAPI_Cleanup( const HAPI_Session * session );
305 
306 // DIAGNOSTICS --------------------------------------------------------------
307 
308 /// @brief Gives back a certain environment integers like version number.
309 /// Note that you do not need a session for this. These constants
310 /// are hard-coded in all HAPI implementations, including HARC and
311 /// HAPIL. This should be the first API you call to determine if
312 /// any future API calls will mismatch implementation.
313 ///
314 /// @param[in] int_type
315 /// One of ::HAPI_EnvIntType.
316 ///
317 /// @param[out] value
318 /// Int value.
319 ///
320 HAPI_DECL HAPI_GetEnvInt( HAPI_EnvIntType int_type, int * value );
321 
322 /// @brief Gives back a certain session-specific environment integers
323 /// like current license type being used.
324 ///
325 /// @param[in] session
326 /// The session of Houdini you are interacting with.
327 /// See @ref HAPI_Sessions for more on sessions.
328 /// Pass NULL to just use the default in-process session.
329 ///
330 /// @param[in] int_type
331 /// One of ::HAPI_SessionEnvIntType.
332 ///
333 /// @param[out] value
334 /// Int value.
335 ///
337  HAPI_SessionEnvIntType int_type,
338  int * value );
339 
340 /// @brief Get environment variable from the server process as an integer.
341 ///
342 /// @param[in] session
343 /// The session of Houdini you are interacting with.
344 /// See @ref HAPI_Sessions for more on sessions.
345 /// Pass NULL to just use the default in-process session.
346 ///
347 /// @param[in] variable_name
348 /// Name of the environmnet variable.
349 ///
350 /// @param[out] value
351 /// The int pointer to return the value in.
352 ///
354  const char * variable_name,
355  int * value );
356 
357 /// @brief Get environment variable from the server process as a string.
358 ///
359 /// @param[in] session
360 /// The session of Houdini you are interacting with.
361 /// See @ref HAPI_Sessions for more on sessions.
362 /// Pass NULL to just use the default in-process session.
363 ///
364 /// @param[in] variable_name
365 /// Name of the environmnet variable.
366 ///
367 /// @param[out] value
368 /// The HAPI_StringHandle pointer to return the value in.
369 ///
371  const char * variable_name,
372  HAPI_StringHandle * value );
373 
374 /// @brief Set environment variable for the server process as an integer.
375 ///
376 /// Note that this may affect other sessions on the same server
377 /// process. The session parameter is mainly there to identify the
378 /// server process, not the specific session.
379 ///
380 /// For in-process sessions, this will affect the current process's
381 /// environment.
382 ///
383 /// @param[in] session
384 /// The session of Houdini you are interacting with.
385 /// See @ref HAPI_Sessions for more on sessions.
386 /// Pass NULL to just use the default in-process session.
387 ///
388 /// @param[in] variable_name
389 /// Name of the environmnet variable.
390 ///
391 /// @param[in] value
392 /// The integer value.
393 ///
395  const char * variable_name,
396  int value );
397 
398 /// @brief Set environment variable for the server process as a string.
399 ///
400 /// Note that this may affect other sessions on the same server
401 /// process. The session parameter is mainly there to identify the
402 /// server process, not the specific session.
403 ///
404 /// For in-process sessions, this will affect the current process's
405 /// environment.
406 ///
407 /// @param[in] session
408 /// The session of Houdini you are interacting with.
409 /// See @ref HAPI_Sessions for more on sessions.
410 /// Pass NULL to just use the default in-process session.
411 ///
412 /// @param[in] variable_name
413 /// Name of the environmnet variable.
414 ///
415 /// @param[in] value
416 /// The string value.
417 ///
419  const char * variable_name,
420  const char * value );
421 
422 /// @brief Gives back the status code for a specific status type.
423 ///
424 /// @param[in] session
425 /// The session of Houdini you are interacting with.
426 /// See @ref HAPI_Sessions for more on sessions.
427 /// Pass NULL to just use the default in-process session.
428 ///
429 /// @param[in] status_type
430 /// One of ::HAPI_StatusType.
431 ///
432 /// @param[out] status
433 /// Actual status code for the status type given. That is,
434 /// if you pass in ::HAPI_STATUS_CALL_RESULT as
435 /// status_type, you'll get back a ::HAPI_Result for this
436 /// argument. If you pass in ::HAPI_STATUS_COOK_STATE
437 /// as status_type, you'll get back a ::HAPI_State enum
438 /// for this argument.
439 ///
440 HAPI_DECL HAPI_GetStatus( const HAPI_Session * session,
441  HAPI_StatusType status_type,
442  int * status );
443 
444 /// @brief Return length of string buffer storing status string message.
445 ///
446 /// If called with ::HAPI_STATUS_COOK_RESULT this will actually
447 /// parse the node networks for the previously cooked asset(s)
448 /// and aggregate all node errors, warnings, and messages
449 /// (depending on the @c verbosity level set). Usually this is done
450 /// just for the last cooked single asset but if you load a whole
451 /// Houdini scene using ::HAPI_LoadHIPFile() then you'll have
452 /// multible "previously cooked assets".
453 ///
454 /// You MUST call ::HAPI_GetStatusStringBufLength() before calling
455 /// ::HAPI_GetStatusString() because ::HAPI_GetStatusString() will
456 /// not return the real status string and instead return a
457 /// cached version of the string that was created inside
458 /// ::HAPI_GetStatusStringBufLength(). The reason for this is that
459 /// the length of the real status string may change between
460 /// the call to ::HAPI_GetStatusStringBufLength() and the call to
461 /// ::HAPI_GetStatusString().
462 ///
463 /// @param[in] session
464 /// The session of Houdini you are interacting with.
465 /// See @ref HAPI_Sessions for more on sessions.
466 /// Pass NULL to just use the default in-process session.
467 ///
468 /// @param[in] status_type
469 /// One of ::HAPI_StatusType.
470 ///
471 /// @param[in] verbosity
472 /// Preferred verbosity level.
473 ///
474 /// @param[out] buffer_length
475 /// Length of buffer char array ready to be filled.
476 ///
478  HAPI_StatusType status_type,
479  HAPI_StatusVerbosity verbosity,
480  int * buffer_length );
481 
482 /// @brief Return status string message.
483 ///
484 /// You MUST call ::HAPI_GetStatusStringBufLength() before calling
485 /// ::HAPI_GetStatusString() because ::HAPI_GetStatusString() will
486 /// not return the real status string and instead return a
487 /// cached version of the string that was created inside
488 /// ::HAPI_GetStatusStringBufLength(). The reason for this is that
489 /// the length of the real status string may change between
490 /// the call to ::HAPI_GetStatusStringBufLength() and the call to
491 /// ::HAPI_GetStatusString().
492 ///
493 /// @param[in] session
494 /// The session of Houdini you are interacting with.
495 /// See @ref HAPI_Sessions for more on sessions.
496 /// Pass NULL to just use the default in-process session.
497 ///
498 /// @param[in] status_type
499 /// One of ::HAPI_StatusType.
500 ///
501 /// @param[out] string_value
502 /// Buffer char array ready to be filled.
503 ///
504 /// @param[in] length
505 /// Length of the string buffer (must match size of
506 /// string_value - so including NULL terminator).
507 ///
509  HAPI_StatusType status_type,
510  char * string_value,
511  int length );
512 
513 /// @brief Get total number of nodes that need to cook in the current
514 /// session.
515 ///
516 /// @param[in] session
517 /// The session of Houdini you are interacting with.
518 /// See @ref HAPI_Sessions for more on sessions.
519 /// Pass NULL to just use the default in-process session.
520 ///
521 /// @param[out] count
522 /// Total cook count.
523 ///
525  int * count );
526 
527 /// @brief Get current number of nodes that have already cooked in the
528 /// current session. Note that this is a very crude approximation
529 /// of the cooking progress - it may never make it to 100% or it
530 /// might spend another hour at 100%. Use ::HAPI_GetStatusString
531 /// to get a better idea of progress if this number gets stuck.
532 ///
533 /// @param[in] session
534 /// The session of Houdini you are interacting with.
535 /// See @ref HAPI_Sessions for more on sessions.
536 /// Pass NULL to just use the default in-process session.
537 ///
538 /// @param[out] count
539 /// Current cook count.
540 ///
542  int * count );
543 
544 // UTILITY ------------------------------------------------------------------
545 
546 /// @brief Converts the transform described by a ::HAPI_TransformEuler
547 /// struct into a different transform and rotation order.
548 ///
549 /// @param[in] session
550 /// The session of Houdini you are interacting with.
551 /// See @ref HAPI_Sessions for more on sessions.
552 /// Pass NULL to just use the default in-process session.
553 ///
554 /// @param[in] transform_in
555 /// The transform to be converted.
556 ///
557 /// @param[in] rst_order
558 /// The desired transform order of the output.
559 ///
560 /// @param[in] rot_order
561 /// The desired rotation order of the output.
562 ///
563 /// @param[out] transform_out
564 /// The converted transform.
565 ///
567  const HAPI_TransformEuler * transform_in,
568  HAPI_RSTOrder rst_order,
569  HAPI_XYZOrder rot_order,
570  HAPI_TransformEuler * transform_out );
571 
572 /// @brief Converts a 4x4 matrix into its TRS form.
573 ///
574 /// @param[in] session
575 /// The session of Houdini you are interacting with.
576 /// See @ref HAPI_Sessions for more on sessions.
577 /// Pass NULL to just use the default in-process session.
578 ///
579 /// @param[in] matrix
580 /// A 4x4 matrix expressed in a 16 element float array.
581 ///
582 /// @param[in] rst_order
583 /// The desired transform order of the output.
584 ///
585 /// @param[out] transform_out
586 /// Used for the output.
587 ///
589  const float * matrix,
590  HAPI_RSTOrder rst_order,
591  HAPI_Transform * transform_out );
592 
593 /// @brief Converts a 4x4 matrix into its TRS form.
594 ///
595 /// @param[in] session
596 /// The session of Houdini you are interacting with.
597 /// See @ref HAPI_Sessions for more on sessions.
598 /// Pass NULL to just use the default in-process session.
599 ///
600 /// @param[in] matrix
601 /// A 4x4 matrix expressed in a 16 element float array.
602 ///
603 /// @param[in] rst_order
604 /// The desired transform order of the output.
605 ///
606 /// @param[in] rot_order
607 /// The desired rotation order of the output.
608 ///
609 /// @param[out] transform_out
610 /// Used for the output.
611 ///
613  const float * matrix,
614  HAPI_RSTOrder rst_order,
615  HAPI_XYZOrder rot_order,
616  HAPI_TransformEuler * transform_out );
617 
618 /// @brief Converts ::HAPI_Transform into a 4x4 transform matrix.
619 ///
620 /// @param[in] session
621 /// The session of Houdini you are interacting with.
622 /// See @ref HAPI_Sessions for more on sessions.
623 /// Pass NULL to just use the default in-process session.
624 ///
625 /// @param[in] transform
626 /// The ::HAPI_Transform you wish to convert.
627 ///
628 /// @param[out] matrix
629 /// A 16 element float array that will contain the result.
630 ///
632  const HAPI_Transform * transform,
633  float * matrix );
634 
635 /// @brief Converts ::HAPI_TransformEuler into a 4x4 transform matrix.
636 ///
637 /// @param[in] session
638 /// The session of Houdini you are interacting with.
639 /// See @ref HAPI_Sessions for more on sessions.
640 /// Pass NULL to just use the default in-process session.
641 ///
642 /// @param[in] transform
643 /// The ::HAPI_TransformEuler you wish to convert.
644 ///
645 /// @param[out] matrix
646 /// A 16 element float array that will contain the result.
647 ///
649  const HAPI_Session * session,
650  const HAPI_TransformEuler * transform,
651  float * matrix );
652 
653 /// @brief Acquires or releases the Python interpreter lock. This is
654 /// needed if HAPI is called from Python and HAPI is in threaded
655 /// mode (see ::HAPI_Initialize()).
656 ///
657 /// The problem arises when async functions like
658 /// ::HAPI_InstantiateAsset() may start a cooking thread that
659 /// may try to run Python code. That is, we would now have
660 /// Python running on two different threads - something not
661 /// allowed by Python by default.
662 ///
663 /// We need to tell Python to explicitly "pause" the Python state
664 /// on the client thread while we run Python in our cooking thread.
665 ///
666 /// You must call this function first with locked == true before
667 /// any async HAPI call. Then, after the async call finished,
668 /// detected via calls to ::HAPI_GetStatus(), call this method
669 /// again to release the lock with locked == false.
670 ///
671 /// @param[in] session
672 /// The session of Houdini you are interacting with.
673 /// See @ref HAPI_Sessions for more on sessions.
674 /// Pass NULL to just use the default in-process session.
675 ///
676 /// @param[in] locked
677 /// True will acquire the interpreter lock to use it for
678 /// the HAPI cooking thread. False will release the lock
679 /// back to the client thread.
680 ///
682  HAPI_Bool locked );
683 
684 // STRINGS ------------------------------------------------------------------
685 
686 /// @brief Gives back the string length of the string with the
687 /// given handle.
688 ///
689 /// @param[in] session
690 /// The session of Houdini you are interacting with.
691 /// See @ref HAPI_Sessions for more on sessions.
692 /// Pass NULL to just use the default in-process session.
693 ///
694 /// @param[in] string_handle
695 /// Handle of the string to query.
696 ///
697 /// @param[out] buffer_length
698 /// Buffer length of the queried string (including NULL
699 /// terminator).
700 ///
702  HAPI_StringHandle string_handle,
703  int * buffer_length );
704 
705 /// @brief Gives back the string value of the string with the
706 /// given handle.
707 ///
708 /// @param[in] session
709 /// The session of Houdini you are interacting with.
710 /// See @ref HAPI_Sessions for more on sessions.
711 /// Pass NULL to just use the default in-process session.
712 ///
713 /// @param[in] string_handle
714 /// Handle of the string to query.
715 ///
716 /// @param[out] string_value
717 /// Actual string value (character array).
718 ///
719 /// @param[in] length
720 /// Length of the string buffer (must match size of
721 /// string_value - so including NULL terminator).
722 ///
723 HAPI_DECL HAPI_GetString( const HAPI_Session * session,
724  HAPI_StringHandle string_handle,
725  char * string_value,
726  int length );
727 
728 // TIME ---------------------------------------------------------------------
729 
730 /// @brief Gets the global time of the scene. All API calls deal with
731 /// this time to cook.
732 ///
733 /// @param[in] session
734 /// The session of Houdini you are interacting with.
735 /// See @ref HAPI_Sessions for more on sessions.
736 /// Pass NULL to just use the default in-process session.
737 ///
738 /// @param[out] time
739 /// Time as a float in seconds.
740 ///
741 HAPI_DECL HAPI_GetTime( const HAPI_Session * session, float * time );
742 
743 /// @brief Sets the global time of the scene. All API calls will deal
744 /// with this time to cook.
745 ///
746 /// @param[in] session
747 /// The session of Houdini you are interacting with.
748 /// See @ref HAPI_Sessions for more on sessions.
749 /// Pass NULL to just use the default in-process session.
750 ///
751 /// @param[in] time
752 /// Time as a float in seconds.
753 ///
754 HAPI_DECL HAPI_SetTime( const HAPI_Session * session, float time );
755 
756 /// @brief Gets the current global timeline options.
757 ///
758 /// @param[in] session
759 /// The session of Houdini you are interacting with.
760 /// See @ref HAPI_Sessions for more on sessions.
761 /// Pass NULL to just use the default in-process session.
762 ///
763 /// @param[in] timeline_options
764 /// The global timeline options struct.
765 ///
767  HAPI_TimelineOptions * timeline_options );
768 
769 /// @brief Sets the global timeline options.
770 ///
771 /// @param[in] session
772 /// The session of Houdini you are interacting with.
773 /// See @ref HAPI_Sessions for more on sessions.
774 /// Pass NULL to just use the default in-process session.
775 ///
776 /// @param[in] timeline_options
777 /// The global timeline options struct.
778 ///
780  const HAPI_Session * session,
781  const HAPI_TimelineOptions * timeline_options );
782 
783 // ASSETS -------------------------------------------------------------------
784 
785 /// @brief Determine if your instance of the asset actually still exists
786 /// inside the Houdini scene. This is what can be used to
787 /// determine when the Houdini scene needs to be re-populated
788 /// using the host application's instances of the assets.
789 /// Note that this function will ALWAYS return
790 /// ::HAPI_RESULT_SUCCESS.
791 ///
792 /// @param[in] session
793 /// The session of Houdini you are interacting with.
794 /// See @ref HAPI_Sessions for more on sessions.
795 /// Pass NULL to just use the default in-process session.
796 ///
797 /// @param[in] asset_id
798 /// The asset id.
799 ///
800 /// @param[in] asset_validation_id
801 /// The asset validation id that's found in the
802 /// ::HAPI_AssetInfo struct returned by
803 /// ::HAPI_GetAssetInfo.
804 ///
805 /// @param[out] answer
806 /// Answer to the question. 1 for valid, 0 for invalid.
807 ///
808 HAPI_DECL HAPI_IsAssetValid( const HAPI_Session * session,
809  HAPI_AssetId asset_id,
810  int asset_validation_id,
811  int * answer );
812 
813 /// @brief Loads a Houdini asset library (OTL) from a .otl file.
814 /// It does NOT instantiate anything inside the Houdini scene.
815 ///
816 /// @note This is when we actually check for valid licenses.
817 ///
818 /// The next step is to call ::HAPI_GetAvailableAssetCount()
819 /// to get the number of assets contained in the library using the
820 /// returned library_id. Then call ::HAPI_GetAvailableAssets()
821 /// to get the list of available assets by name. Use the asset
822 /// names with ::HAPI_InstantiateAsset() to actually instantiate
823 /// one of these assets in the Houdini scene and get back
824 /// an asset_id.
825 ///
826 /// @note The HIP file saved using ::HAPI_SaveHIPFile() will only
827 /// have an absolute path reference to the loaded OTL meaning
828 /// that if the OTL is moved or renamed the HIP file won't
829 /// load properly. It also means that if you change the OTL
830 /// using the saved HIP scene the same OTL file will change
831 /// as the one used with Houdini Engine.
832 /// See @ref HAPI_Fundamentals_SavingHIPFile.
833 ///
834 /// @param[in] session
835 /// The session of Houdini you are interacting with.
836 /// See @ref HAPI_Sessions for more on sessions.
837 /// Pass NULL to just use the default in-process session.
838 ///
839 /// @param[in] file_path
840 /// Absolute path to the .otl file.
841 ///
842 /// @param[in] allow_overwrite
843 /// With this true, if the library file being loaded
844 /// contains asset defintions that have already been
845 /// loaded they will overwrite the existing definitions.
846 /// Otherwise, a library containing asset defintions that
847 /// already exist will fail to load, returning a
848 /// ::HAPI_Result of
849 /// ::HAPI_RESULT_ASSET_DEF_ALREADY_LOADED.
850 ///
851 /// @param[out] library_id
852 /// Newly loaded otl id to be used with
853 /// ::HAPI_GetAvailableAssetCount() and
854 /// ::HAPI_GetAvailableAssets().
855 ///
857  const char * file_path,
858  HAPI_Bool allow_overwrite,
859  HAPI_AssetLibraryId* library_id );
860 
861 /// @brief Loads a Houdini asset library (OTL) from memory.
862 /// It does NOT instantiate anything inside the Houdini scene.
863 ///
864 /// @note This is when we actually check for valid licenses.
865 ///
866 /// Please note that the performance benefit of loading a library
867 /// from memory are negligible at best. Due to limitations of
868 /// Houdini's library manager, there is still some disk access
869 /// and file writes because every asset library needs to be
870 /// saved to a real file. Use this function only as a convenience
871 /// if you already have the library file in memory and don't wish
872 /// to have to create your own temporary library file and then
873 /// call ::HAPI_LoadAssetLibraryFromFile().
874 ///
875 /// The next step is to call ::HAPI_GetAvailableAssetCount()
876 /// to get the number of assets contained in the library using the
877 /// returned library_id. Then call ::HAPI_GetAvailableAssets()
878 /// to get the list of available assets by name. Use the asset
879 /// names with ::HAPI_InstantiateAsset() to actually instantiate
880 /// one of these assets in the Houdini scene and get back
881 /// an asset_id.
882 ///
883 /// @note The saved HIP file using ::HAPI_SaveHIPFile() will
884 /// @a contain the OTL loaded as part of its @b Embedded OTLs.
885 /// This means that you can safely move or rename the original
886 /// OTL file and the HIP will continue to work but if you make
887 /// changes to the OTL while using the saved HIP the changes
888 /// won't be saved to the original OTL.
889 /// See @ref HAPI_Fundamentals_SavingHIPFile.
890 ///
891 /// @param[in] session
892 /// The session of Houdini you are interacting with.
893 /// See @ref HAPI_Sessions for more on sessions.
894 /// Pass NULL to just use the default in-process session.
895 ///
896 /// @param[in] library_buffer
897 /// The memory buffer containing the asset definitions
898 /// in the same format as a standard Houdini .otl file.
899 ///
900 /// @param[in] library_buffer_length
901 /// The size of the OTL memory buffer.
902 ///
903 /// @param[in] allow_overwrite
904 /// With this true, if the library file being loaded
905 /// contains asset defintions that have already been
906 /// loaded they will overwrite the existing definitions.
907 /// Otherwise, a library containing asset defintions that
908 /// already exist will fail to load, returning a
909 /// ::HAPI_Result of
910 /// ::HAPI_RESULT_ASSET_DEF_ALREADY_LOADED.
911 ///
912 /// @param[out] library_id
913 /// Newly loaded otl id to be used with
914 /// ::HAPI_GetAvailableAssetCount() and
915 /// ::HAPI_GetAvailableAssets().
916 ///
918  const char * library_buffer,
919  int library_buffer_length,
920  HAPI_Bool allow_overwrite,
921  HAPI_AssetLibraryId * library_id );
922 
923 /// @brief Get the number of assets contained in an asset library.
924 /// You should call ::HAPI_LoadAssetLibraryFromFile() prior to
925 /// get a library_id.
926 ///
927 /// @param[in] session
928 /// The session of Houdini you are interacting with.
929 /// See @ref HAPI_Sessions for more on sessions.
930 /// Pass NULL to just use the default in-process session.
931 ///
932 /// @param[in] library_id
933 /// Returned by ::HAPI_LoadAssetLibraryFromFile().
934 ///
935 /// @param[out] asset_count
936 /// The number of assets contained in this asset library.
937 ///
939  HAPI_AssetLibraryId library_id,
940  int * asset_count );
941 
942 /// @brief Get the names of the assets contained in an asset library.
943 ///
944 /// The asset names will contain additional information about
945 /// the type of asset, namespace, and version, along with the
946 /// actual asset name. For example, if you have an Object type
947 /// asset, in the "hapi" namespace, of version 2.0, named
948 /// "foo", the asset name returned here will be:
949 /// hapi::Object/foo::2.0
950 ///
951 /// However, you should not need to worry about this detail. Just
952 /// pass this string directly to ::HAPI_InstantiateAsset() to
953 /// instantiate the asset. You can then get the pretty name
954 /// using ::HAPI_GetAssetInfo().
955 ///
956 /// You should call ::HAPI_LoadAssetLibraryFromFile() prior to
957 /// get a library_id. Then, you should call
958 /// ::HAPI_GetAvailableAssetCount() to get the number of assets to
959 /// know how large of a string handles array you need to allocate.
960 ///
961 /// @param[in] session
962 /// The session of Houdini you are interacting with.
963 /// See @ref HAPI_Sessions for more on sessions.
964 /// Pass NULL to just use the default in-process session.
965 ///
966 /// @param[in] library_id
967 /// Returned by ::HAPI_LoadAssetLibraryFromFile().
968 ///
969 /// @param[out] asset_names_array
970 /// Array of string handles (integers) that should be
971 /// at least the size of asset_count.
972 ///
973 /// @param[out] asset_count
974 /// Should be the same or less than the value returned by
975 /// ::HAPI_GetAvailableAssetCount().
976 ///
978  HAPI_AssetLibraryId library_id,
979  HAPI_StringHandle * asset_names_array,
980  int asset_count );
981 
982 /// @brief Instantiate an asset by name. The asset has to have been
983 /// loaded as part of an asset library, using
984 /// ::HAPI_LoadAssetLibraryFromFile().
985 ///
986 /// @note In threaded mode, this is an _async call_!
987 ///
988 /// @note This is also when we actually check for valid licenses.
989 ///
990 /// This API will invoke the cooking thread if threading is
991 /// enabled. This means it will return immidiately with a call
992 /// result of ::HAPI_RESULT_SUCCESS, even if fed garbage. Use
993 /// the status and cooking count APIs under DIAGNOSTICS to get
994 /// a sense of the progress. All other API calls will block
995 /// until the instatiation (and, optionally, the first cook)
996 /// has finished.
997 ///
998 /// Also note that the cook result won't be of type
999 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1000 /// Whenever the threading cook is done it will fill the
1001 /// @a cook result which is queried using
1002 /// ::HAPI_STATUS_COOK_RESULT.
1003 ///
1004 /// @param[in] session
1005 /// The session of Houdini you are interacting with.
1006 /// See @ref HAPI_Sessions for more on sessions.
1007 /// Pass NULL to just use the default in-process session.
1008 ///
1009 /// @param[in] asset_name
1010 /// The name of the asset to load. Use
1011 /// ::HAPI_GetAvailableAssets() to get the available
1012 /// asset names in a loaded asset library.
1013 ///
1014 /// @param[out] cook_on_load
1015 /// Set to true if you wish the asset to cook as soon
1016 /// as it is instantiated. Otherwise, you will have to
1017 /// call ::HAPI_CookAsset() explicitly after you call
1018 /// this function.
1019 ///
1020 /// Normally you should set this to true but if you want
1021 /// to change parameters on an asset before the first
1022 /// cook set this to false. You can then use
1023 /// ::HAPI_GetAssetInfo() to get the node_id of the asset
1024 /// and use the parameter APIs to update the values.
1025 /// Then, call ::HAPI_CookAsset() explicitly. To know
1026 /// whether an asset as cooked at least once there is a
1027 /// flag in ::HAPI_AssetInfo called hasEverCooked.
1028 ///
1029 /// @param[out] asset_id
1030 /// Newly created asset's id. Use ::HAPI_GetAssetInfo()
1031 /// to get more information about the asset.
1032 ///
1034  const char * asset_name,
1035  HAPI_Bool cook_on_load,
1036  HAPI_AssetId * asset_id );
1037 
1038 /// @brief Creates a special curve asset that can be used as input for
1039 /// other assets in the scene.
1040 ///
1041 /// @note In threaded mode, this is an _async call_!
1042 ///
1043 /// Note that when saving the Houdini scene using
1044 /// ::HAPI_SaveHIPFile() the curve nodes created with this
1045 /// method will be yellow and will start with the name "curve".
1046 ///
1047 /// @param[in] session
1048 /// The session of Houdini you are interacting with.
1049 /// See @ref HAPI_Sessions for more on sessions.
1050 /// Pass NULL to just use the default in-process session.
1051 ///
1052 /// @param[out] asset_id
1053 /// Newly created curve's asset id. Use
1054 /// ::HAPI_GetAssetInfo() to get more information
1055 /// about the asset.
1056 ///
1057 HAPI_DECL HAPI_CreateCurve( const HAPI_Session * session,
1058  HAPI_AssetId * asset_id );
1059 
1060 /// @brief Creates a special asset that can accept geometry input.
1061 /// This will create a dummy OBJ node with a Null SOP inside that
1062 /// you can set the geometry of using the geometry SET APIs.
1063 /// You can then connect this asset to any other asset using
1064 /// inter-asset connection APIs.
1065 ///
1066 /// @note In threaded mode, this is an _async call_!
1067 ///
1068 /// All you need to remember is that this asset has a single
1069 /// object and a single geo which means that for all subsequent
1070 /// geometry setter functions just pass in 0 (zero) for the
1071 /// object id and 0 (zero) for the geo id.
1072 ///
1073 /// Note that when saving the Houdini scene using
1074 /// ::HAPI_SaveHIPFile() the curve nodes created with this
1075 /// method will be green and will start with the name "input".
1076 ///
1077 /// @param[in] session
1078 /// The session of Houdini you are interacting with.
1079 /// See @ref HAPI_Sessions for more on sessions.
1080 /// Pass NULL to just use the default in-process session.
1081 ///
1082 /// @param[out] asset_id
1083 /// Newly created asset's id. Use ::HAPI_GetAssetInfo()
1084 /// to get more information about the asset.
1085 ///
1086 /// @param[in] name
1087 /// Give this input asset a name for easy debugging.
1088 /// The asset's obj node and the null SOP node will both
1089 /// get this given name with "input_" prepended.
1090 /// You can also pass NULL in which case the name will
1091 /// be "input#" where # is some number.
1092 ///
1094  HAPI_AssetId * asset_id,
1095  const char * name );
1096 
1097 /// @brief Destroy the asset instance.
1098 ///
1099 /// @param[in] session
1100 /// The session of Houdini you are interacting with.
1101 /// See @ref HAPI_Sessions for more on sessions.
1102 /// Pass NULL to just use the default in-process session.
1103 ///
1104 /// @param[in] asset_id
1105 /// The asset id.
1106 ///
1107 HAPI_DECL HAPI_DestroyAsset( const HAPI_Session * session,
1108  HAPI_AssetId asset_id );
1109 
1110 /// @brief Fill an asset_info struct.
1111 ///
1112 /// @param[in] session
1113 /// The session of Houdini you are interacting with.
1114 /// See @ref HAPI_Sessions for more on sessions.
1115 /// Pass NULL to just use the default in-process session.
1116 ///
1117 /// @param[in] asset_id
1118 /// The asset id.
1119 ///
1120 /// @param[out] asset_info
1121 /// Return value - contains things like asset id.
1122 ///
1123 HAPI_DECL HAPI_GetAssetInfo( const HAPI_Session * session,
1124  HAPI_AssetId asset_id,
1125  HAPI_AssetInfo * asset_info );
1126 
1127 /// @brief Initiate a cook on this asset. Note that this may trigger
1128 /// cooks on other assets if they are connected.
1129 ///
1130 /// @note In threaded mode, this is an _async call_!
1131 ///
1132 /// This API will invoke the cooking thread if threading is
1133 /// enabled. This means it will return immidiately. Use
1134 /// the status and cooking count APIs under DIAGNOSTICS to get
1135 /// a sense of the progress. All other API calls will block
1136 /// until the cook operation has finished.
1137 ///
1138 /// Also note that the cook result won't be of type
1139 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1140 /// Whenever the threading cook is done it will fill the
1141 /// @a cook result which is queried using
1142 /// ::HAPI_STATUS_COOK_RESULT.
1143 ///
1144 /// @param[in] session
1145 /// The session of Houdini you are interacting with.
1146 /// See @ref HAPI_Sessions for more on sessions.
1147 /// Pass NULL to just use the default in-process session.
1148 ///
1149 /// @param[in] asset_id
1150 /// The asset id.
1151 ///
1152 /// @param[in] cook_options
1153 /// The cook options. Pass in NULL to use the global
1154 /// cook options that you specified when calling
1155 /// ::HAPI_Initialize().
1156 ///
1157 HAPI_DECL HAPI_CookAsset( const HAPI_Session * session,
1158  HAPI_AssetId asset_id,
1159  const HAPI_CookOptions * cook_options );
1160 
1161 /// @brief Interrupt a cook or load operation.
1162 ///
1163 /// @param[in] session
1164 /// The session of Houdini you are interacting with.
1165 /// See @ref HAPI_Sessions for more on sessions.
1166 /// Pass NULL to just use the default in-process session.
1167 ///
1168 HAPI_DECL HAPI_Interrupt( const HAPI_Session * session );
1169 
1170 /// @brief Get the transform of an asset to match the transform of the
1171 /// asset on the client side.
1172 ///
1173 /// @param[in] session
1174 /// The session of Houdini you are interacting with.
1175 /// See @ref HAPI_Sessions for more on sessions.
1176 /// Pass NULL to just use the default in-process session.
1177 ///
1178 /// @param[in] asset_id
1179 /// The asset id.
1180 ///
1181 /// @param[in] rst_order
1182 /// The order of application of translation, rotation and
1183 /// scale.
1184 ///
1185 /// @param[in] rot_order
1186 /// The desired rotation order of the output.
1187 ///
1188 /// @param[out] transform
1189 /// The actual transform struct.
1190 ///
1192  HAPI_AssetId asset_id,
1193  HAPI_RSTOrder rst_order,
1194  HAPI_XYZOrder rot_order,
1195  HAPI_TransformEuler * transform );
1196 
1197 /// @brief Set the transform of an asset to match the transform of the
1198 /// asset on the client side.
1199 ///
1200 /// @param[in] session
1201 /// The session of Houdini you are interacting with.
1202 /// See @ref HAPI_Sessions for more on sessions.
1203 /// Pass NULL to just use the default in-process session.
1204 ///
1205 /// @param[in] asset_id
1206 /// The asset id.
1207 ///
1208 /// @param[in] transform
1209 /// The actual transform struct.
1210 ///
1212  HAPI_AssetId asset_id,
1213  const HAPI_TransformEuler * transform );
1214 
1215 /// @brief Get the name of an asset's input. This function will return
1216 /// a string handle for the name which will be valid (persist)
1217 /// until the next call to this function.
1218 ///
1219 /// @param[in] session
1220 /// The session of Houdini you are interacting with.
1221 /// See @ref HAPI_Sessions for more on sessions.
1222 /// Pass NULL to just use the default in-process session.
1223 ///
1224 /// @param[in] asset_id
1225 /// The asset id.
1226 ///
1227 /// @param[in] input_idx
1228 /// Input index of the asset.
1229 ///
1230 /// @param[in] input_type
1231 /// Of type ::HAPI_InputType.
1232 ///
1233 /// @param[out] name
1234 /// Input name string handle return value - valid until
1235 /// the next call to this function.
1236 ///
1237 HAPI_DECL HAPI_GetInputName( const HAPI_Session * session,
1238  HAPI_AssetId asset_id,
1239  int input_idx, int input_type,
1240  HAPI_StringHandle * name );
1241 
1242 // HIP FILES ----------------------------------------------------------------
1243 
1244 /// @brief Loads a .hip file into the main Houdini scene.
1245 ///
1246 /// @note In threaded mode, this is an _async call_!
1247 ///
1248 /// @param[in] session
1249 /// The session of Houdini you are interacting with.
1250 /// See @ref HAPI_Sessions for more on sessions.
1251 /// Pass NULL to just use the default in-process session.
1252 ///
1253 /// @param[in] file_name
1254 /// Absolute path to the .hip file to load.
1255 ///
1256 /// @param[in] cook_on_load
1257 /// Set to true if you wish the assets to cook as soon
1258 /// as they are instantiated. Otherwise, you will have to
1259 /// call ::HAPI_CookAsset() explicitly for each after you
1260 /// call this function.
1261 ///
1262 HAPI_DECL HAPI_LoadHIPFile( const HAPI_Session * session,
1263  const char * file_name,
1264  HAPI_Bool cook_on_load );
1265 
1266 /// @brief Resyncs a HAPI to the underlying Houdini scene after one more
1267 /// more nodes have been created by an asset (say using python)
1268 /// at the /OBJ level, or a new scene has been loaded using
1269 /// ::HAPI_LoadHIPFile().
1270 /// Note that function will always return the same thing until
1271 /// you call ::HAPI_GetNewAssetIds() to clear the results.
1272 ///
1273 /// @param[in] session
1274 /// The session of Houdini you are interacting with.
1275 /// See @ref HAPI_Sessions for more on sessions.
1276 /// Pass NULL to just use the default in-process session.
1277 ///
1278 /// @param[out] new_asset_count
1279 /// A pointer to an int that will receive the asset count.
1280 ///
1282  int * new_asset_count );
1283 
1284 /// @brief Retrieves the asset ids from the previous call to
1285 /// ::HAPI_CheckForNewAssets().
1286 ///
1287 /// @param[in] session
1288 /// The session of Houdini you are interacting with.
1289 /// See @ref HAPI_Sessions for more on sessions.
1290 /// Pass NULL to just use the default in-process session.
1291 ///
1292 /// @param[out] asset_ids_array
1293 /// A buffer of length num_assets as returned
1294 /// by the call to ::HAPI_CheckForNewAssets().
1295 /// When the function returns this buffer
1296 /// will be filled with the asset ids.
1297 ///
1298 /// @param[in] new_asset_count
1299 /// Must be the new_asset_count you got from
1300 /// HAPI_CheckForNewAssets().
1301 ///
1302 HAPI_DECL HAPI_GetNewAssetIds( const HAPI_Session * session,
1303  HAPI_AssetId * asset_ids_array,
1304  int new_asset_count );
1305 
1306 /// @brief Saves a .hip file of the current Houdini scene.
1307 ///
1308 /// @param[in] session
1309 /// The session of Houdini you are interacting with.
1310 /// See @ref HAPI_Sessions for more on sessions.
1311 /// Pass NULL to just use the default in-process session.
1312 ///
1313 /// @param[in] file_path
1314 /// Absolute path to the .hip file to save to.
1315 ///
1316 /// @param[in] lock_nodes
1317 /// Specify whether to lock all SOP nodes before saving
1318 /// the scene file. This way, when you load the scene
1319 /// file you can see exactly the state of each SOP at
1320 /// the time it was saved instead of relying on the
1321 /// re-cook to accurately reproduce the state. It does,
1322 /// however, take a lot more space and time locking all
1323 /// nodes like this.
1324 ///
1325 HAPI_DECL HAPI_SaveHIPFile( const HAPI_Session * session,
1326  const char * file_path,
1327  HAPI_Bool lock_nodes );
1328 
1329 // NODES --------------------------------------------------------------------
1330 
1331 /// @brief Fill an ::HAPI_NodeInfo struct.
1332 ///
1333 /// @param[in] session
1334 /// The session of Houdini you are interacting with.
1335 /// See @ref HAPI_Sessions for more on sessions.
1336 /// Pass NULL to just use the default in-process session.
1337 ///
1338 /// @param[in] node_id
1339 /// The node id.
1340 ///
1341 /// @param[out] node_info
1342 /// Return value - contains things like asset id.
1343 ///
1344 HAPI_DECL HAPI_GetNodeInfo( const HAPI_Session * session,
1345  HAPI_NodeId node_id,
1346  HAPI_NodeInfo * node_info );
1347 
1348 /// @brief Get the node ids of the editable node networks exposed by the
1349 /// asset author.
1350 ///
1351 /// @param[in] session
1352 /// The session of Houdini you are interacting with.
1353 /// See @ref HAPI_Sessions for more on sessions.
1354 /// Pass NULL to just use the default in-process session.
1355 ///
1356 /// @param[in] asset_id
1357 /// The asset id.
1358 ///
1359 /// @param[out] node_networks_array
1360 /// The list of node networks' node ids. Should be an
1361 /// array exactly the size of:
1362 /// ::HAPI_AssetInfo::editableNodeNetworkCount.
1363 ///
1364 /// @param[in] count
1365 /// Should be exactly
1366 /// ::HAPI_AssetInfo::editableNodeNetworkCount.
1367 ///
1369  HAPI_AssetId asset_id,
1370  HAPI_NodeId * node_networks_array,
1371  int count );
1372 
1373 /// @brief Get the node ids of the children nodes of the specified
1374 /// parent node network.
1375 ///
1376 /// @param[in] session
1377 /// The session of Houdini you are interacting with.
1378 /// See @ref HAPI_Sessions for more on sessions.
1379 /// Pass NULL to just use the default in-process session.
1380 ///
1381 /// @param[in] network_node_id
1382 /// The parent node network's node id.
1383 ///
1384 /// @param[out] child_node_ids_array
1385 /// The list of child nodes' node ids. Should be an
1386 /// array exactly the size of:
1387 /// ::HAPI_NodeInfo::childNodeCount.
1388 ///
1389 /// @param[in] count
1390 /// Should be exactly ::HAPI_NodeInfo::childNodeCount.
1391 ///
1393  HAPI_NodeId network_node_id,
1394  HAPI_NodeId * child_node_ids_array,
1395  int count );
1396 
1397 /// @brief Create a node inside a node network. Nodes created this way
1398 /// will have their ::HAPI_NodeInfo::createdPostAssetLoad set
1399 /// to true.
1400 ///
1401 /// @param[in] session
1402 /// The session of Houdini you are interacting with.
1403 /// See @ref HAPI_Sessions for more on sessions.
1404 /// Pass NULL to just use the default in-process session.
1405 ///
1406 /// @param[in] parent_node_id
1407 /// The parent node network's node id.
1408 ///
1409 /// @param[in] operator_name
1410 /// The name of the node operator type. This should
1411 /// include only the namespace, name, and version,
1412 /// For example, if you have an Object type asset, in
1413 /// the "hapi" namespace, of version 2.0, named "foo",
1414 /// the operator_name here will be: "hapi::foo::2.0".
1415 /// Normally, if you don't have a namespace or version,
1416 /// just pass "foo".
1417 ///
1418 /// @param[out] new_node_id
1419 /// The returned node id of the just-created node.
1420 ///
1421 HAPI_DECL HAPI_CreateNode( const HAPI_Session * session,
1422  HAPI_NodeId parent_node_id,
1423  const char * operator_name,
1424  HAPI_NodeId * new_node_id );
1425 
1426 /// @brief Delete a node from a node network. Only nodes with their
1427 /// ::HAPI_NodeInfo::createdPostAssetLoad set to true can be
1428 /// deleted this way.
1429 ///
1430 /// @param[in] session
1431 /// The session of Houdini you are interacting with.
1432 /// See @ref HAPI_Sessions for more on sessions.
1433 /// Pass NULL to just use the default in-process session.
1434 ///
1435 /// @param[in] node_id
1436 /// The node to delete.
1437 ///
1438 HAPI_DECL HAPI_DeleteNode( const HAPI_Session * session,
1439  HAPI_NodeId node_id );
1440 
1441 /// @brief Rename a node that you created. Only nodes with their
1442 /// ::HAPI_NodeInfo::createdPostAssetLoad set to true can be
1443 /// deleted this way.
1444 ///
1445 /// @param[in] session
1446 /// The session of Houdini you are interacting with.
1447 /// See @ref HAPI_Sessions for more on sessions.
1448 /// Pass NULL to just use the default in-process session.
1449 ///
1450 /// @param[in] node_id
1451 /// The node to delete.
1452 ///
1453 /// @param[in] new_name
1454 /// The new node name.
1455 ///
1456 HAPI_DECL HAPI_RenameNode( const HAPI_Session * session,
1457  HAPI_NodeId node_id,
1458  const char * new_name );
1459 
1460 /// @brief Connect two nodes together.
1461 ///
1462 /// @param[in] session
1463 /// The session of Houdini you are interacting with.
1464 /// See @ref HAPI_Sessions for more on sessions.
1465 /// Pass NULL to just use the default in-process session.
1466 ///
1467 /// @param[in] node_id
1468 /// The node whom's input to connect to.
1469 ///
1470 /// @param[in] input_index
1471 /// The input index. Should be between 0 and the
1472 /// to_node's ::HAPI_NodeInfo::inputCount.
1473 ///
1474 /// @param[in] node_id_to_connect
1475 /// The node to connect to node_id's input.
1476 ///
1478  HAPI_NodeId node_id,
1479  int input_index,
1480  HAPI_NodeId node_id_to_connect );
1481 
1482 /// @brief Disconnect a node input.
1483 ///
1484 /// @param[in] session
1485 /// The session of Houdini you are interacting with.
1486 /// See @ref HAPI_Sessions for more on sessions.
1487 /// Pass NULL to just use the default in-process session.
1488 ///
1489 /// @param[in] node_id
1490 /// The node whom's input to disconnect.
1491 ///
1492 /// @param[in] input_index
1493 /// The input index. Should be between 0 and the
1494 /// to_node's ::HAPI_NodeInfo::inputCount.
1495 ///
1497  HAPI_NodeId node_id,
1498  int input_index );
1499 
1500 /// @brief Query which node is connected to another node's input.
1501 ///
1502 /// @param[in] session
1503 /// The session of Houdini you are interacting with.
1504 /// See @ref HAPI_Sessions for more on sessions.
1505 /// Pass NULL to just use the default in-process session.
1506 ///
1507 /// @param[in] node_to_query
1508 /// The node to query.
1509 ///
1510 /// @param[in] input_index
1511 /// The input index. Should be between 0 and the
1512 /// to_node's ::HAPI_NodeInfo::inputCount.
1513 ///
1514 /// @param[out] connected_node_id
1515 /// The node id of the connected node to this input. If
1516 /// nothing is connected then -1 will be returned.
1517 ///
1518 HAPI_DECL HAPI_QueryNodeInput( const HAPI_Session * session,
1519  HAPI_NodeId node_to_query,
1520  int input_index,
1521  HAPI_NodeId * connected_node_id );
1522 
1523 // PARAMETERS ---------------------------------------------------------------
1524 
1525 /// @brief Fill an array of ::HAPI_ParmInfo structs with parameter
1526 /// information from the asset instance node.
1527 ///
1528 /// @param[in] session
1529 /// The session of Houdini you are interacting with.
1530 /// See @ref HAPI_Sessions for more on sessions.
1531 /// Pass NULL to just use the default in-process session.
1532 ///
1533 /// @param[in] node_id
1534 /// The node id.
1535 ///
1536 /// @param[out] parm_infos_array
1537 /// Array of ::HAPI_ParmInfo at least the size of
1538 /// length.
1539 ///
1540 /// @param[in] start
1541 /// First index of range. Must be at least 0 and at
1542 /// most ::HAPI_NodeInfo::parmCount - 1.
1543 ///
1544 /// @param[in] length
1545 /// Must be at least 0 and at most
1546 /// ::HAPI_NodeInfo::parmCount - start.
1547 ///
1548 HAPI_DECL HAPI_GetParameters( const HAPI_Session * session,
1549  HAPI_NodeId node_id,
1550  HAPI_ParmInfo * parm_infos_array,
1551  int start, int length );
1552 
1553 /// @brief Get the parm info of a parameter by parm id.
1554 ///
1555 /// @param[in] session
1556 /// The session of Houdini you are interacting with.
1557 /// See @ref HAPI_Sessions for more on sessions.
1558 /// Pass NULL to just use the default in-process session.
1559 ///
1560 /// @param[in] node_id
1561 /// The node id.
1562 ///
1563 /// @param[in] parm_id
1564 /// The parm id.
1565 ///
1566 /// @param[out] parm_info
1567 /// The returned parm info.
1568 ///
1569 HAPI_DECL HAPI_GetParmInfo( const HAPI_Session * session,
1570  HAPI_NodeId node_id,
1571  HAPI_ParmId parm_id,
1572  HAPI_ParmInfo * parm_info );
1573 
1574 /// @brief All parameter APIs require a ::HAPI_ParmId but if you know the
1575 /// parameter you wish to operate on by name than you can use
1576 /// this function to get its ::HAPI_ParmId. If the parameter with
1577 /// the given name is not found the parameter id returned
1578 /// will be -1.
1579 ///
1580 /// @param[in] session
1581 /// The session of Houdini you are interacting with.
1582 /// See @ref HAPI_Sessions for more on sessions.
1583 /// Pass NULL to just use the default in-process session.
1584 ///
1585 /// @param[in] node_id
1586 /// The node id.
1587 ///
1588 /// @param[in] parm_name
1589 /// The parm name.
1590 ///
1591 /// @param[out] parm_id
1592 /// The return value. The parameter's ::HAPI_ParmId. If
1593 /// the parameter with the given name is not found the
1594 /// parameter id returned will be -1.
1595 ///
1597  HAPI_NodeId node_id,
1598  const char * parm_name,
1599  HAPI_ParmId * parm_id );
1600 
1601 /// @brief Get the parm info of a parameter by name.
1602 ///
1603 /// @param[in] session
1604 /// The session of Houdini you are interacting with.
1605 /// See @ref HAPI_Sessions for more on sessions.
1606 /// Pass NULL to just use the default in-process session.
1607 ///
1608 /// @param[in] node_id
1609 /// The node id.
1610 ///
1611 /// @param[in] parm_name
1612 /// The parm name.
1613 ///
1614 /// @param[out] parm_info
1615 /// The returned parm info.
1616 ///
1618  HAPI_NodeId node_id,
1619  const char * parm_name,
1620  HAPI_ParmInfo * parm_info );
1621 
1622 /// @brief Get single parm int value by name.
1623 ///
1624 /// @param[in] session
1625 /// The session of Houdini you are interacting with.
1626 /// See @ref HAPI_Sessions for more on sessions.
1627 /// Pass NULL to just use the default in-process session.
1628 ///
1629 /// @param[in] node_id
1630 /// The node id.
1631 ///
1632 /// @param[in] parm_name
1633 /// The parm name.
1634 ///
1635 /// @param[in] index
1636 /// Index within the parameter's values tuple.
1637 ///
1638 /// @param[out] value
1639 /// The returned int value.
1640 ///
1642  HAPI_NodeId node_id,
1643  const char * parm_name,
1644  int index,
1645  int * value );
1646 
1647 /// @brief Fill an array of parameter int values. This is more efficient
1648 /// than calling ::HAPI_GetParmIntValue() individually for each
1649 /// parameter value.
1650 ///
1651 /// @param[in] session
1652 /// The session of Houdini you are interacting with.
1653 /// See @ref HAPI_Sessions for more on sessions.
1654 /// Pass NULL to just use the default in-process session.
1655 ///
1656 /// @param[in] node_id
1657 /// The node id.
1658 ///
1659 /// @param[out] values_array
1660 /// Array of ints at least the size of length.
1661 ///
1662 /// @param[in] start
1663 /// First index of range. Must be at least 0 and at
1664 /// most ::HAPI_NodeInfo::parmIntValueCount - 1.
1665 ///
1666 /// @param[in] length
1667 /// Must be at least 0 and at most
1668 /// ::HAPI_NodeInfo::parmIntValueCount - start.
1669 ///
1671  HAPI_NodeId node_id,
1672  int * values_array,
1673  int start, int length );
1674 
1675 /// @brief Get single parm float value by name.
1676 ///
1677 /// @param[in] session
1678 /// The session of Houdini you are interacting with.
1679 /// See @ref HAPI_Sessions for more on sessions.
1680 /// Pass NULL to just use the default in-process session.
1681 ///
1682 /// @param[in] node_id
1683 /// The node id.
1684 ///
1685 /// @param[in] parm_name
1686 /// The parm name.
1687 ///
1688 /// @param[in] index
1689 /// Index within the parameter's values tuple.
1690 ///
1691 /// @param[out] value
1692 /// The returned float value.
1693 ///
1695  HAPI_NodeId node_id,
1696  const char * parm_name,
1697  int index,
1698  float * value );
1699 
1700 /// @brief Fill an array of parameter float values. This is more efficient
1701 /// than calling ::HAPI_GetParmFloatValue() individually for each
1702 /// parameter value.
1703 ///
1704 /// @param[in] session
1705 /// The session of Houdini you are interacting with.
1706 /// See @ref HAPI_Sessions for more on sessions.
1707 /// Pass NULL to just use the default in-process session.
1708 ///
1709 /// @param[in] node_id
1710 /// The node id.
1711 ///
1712 /// @param[out] values_array
1713 /// Array of floats at least the size of length.
1714 ///
1715 /// @param[in] start
1716 /// First index of range. Must be at least 0 and at
1717 /// most ::HAPI_NodeInfo::parmFloatValueCount - 1.
1718 ///
1719 /// @param[in] length
1720 /// Must be at least 1 and at most
1721 /// ::HAPI_NodeInfo::parmFloatValueCount - start.
1722 ///
1724  HAPI_NodeId node_id,
1725  float * values_array,
1726  int start, int length );
1727 
1728 /// @brief Get single parm string value by name.
1729 ///
1730 /// @param[in] session
1731 /// The session of Houdini you are interacting with.
1732 /// See @ref HAPI_Sessions for more on sessions.
1733 /// Pass NULL to just use the default in-process session.
1734 ///
1735 /// @param[in] node_id
1736 /// The node id.
1737 ///
1738 /// @param[in] parm_name
1739 /// The name of the parameter.
1740 ///
1741 /// @param[in] index
1742 /// Index within the parameter's values tuple.
1743 ///
1744 /// @param[in] evaluate
1745 /// Whether or not to evaluate the string expression.
1746 /// For example, the string "$F" would evaluate to the
1747 /// current frame number. So, passing in evaluate = false
1748 /// would give you back the string "$F" and passing
1749 /// in evaluate = true would give you back "1" (assuming
1750 /// the current frame is 1).
1751 ///
1752 /// @param[out] value
1753 /// The returned string value.
1754 ///
1756  HAPI_NodeId node_id,
1757  const char * parm_name,
1758  int index,
1759  HAPI_Bool evaluate,
1760  HAPI_StringHandle * value );
1761 
1762 /// @brief Fill an array of parameter string handles. These handles must
1763 /// be used in conjunction with ::HAPI_GetString() to get the
1764 /// actual string values. This is more efficient than calling
1765 /// ::HAPI_GetParmStringValue() individually for each
1766 /// parameter value.
1767 ///
1768 /// @param[in] session
1769 /// The session of Houdini you are interacting with.
1770 /// See @ref HAPI_Sessions for more on sessions.
1771 /// Pass NULL to just use the default in-process session.
1772 ///
1773 /// @param[in] node_id
1774 /// The node id.
1775 ///
1776 /// @param[in] evaluate
1777 /// Whether or not to evaluate the string expression.
1778 /// For example, the string "$F" would evaluate to the
1779 /// current frame number. So, passing in evaluate = false
1780 /// would give you back the string "$F" and passing
1781 /// in evaluate = true would give you back "1" (assuming
1782 /// the current frame is 1).
1783 ///
1784 /// @param[out] values_array
1785 /// Array of ints at least the size of length.
1786 ///
1787 /// @param[in] start
1788 /// First index of range. Must be at least 0 and at
1789 /// most ::HAPI_NodeInfo::parmStringValueCount - 1.
1790 ///
1791 /// @param[in] length
1792 /// Must be at least 1 and at most
1793 /// ::HAPI_NodeInfo::parmStringValueCount - start.
1794 ///
1796  HAPI_NodeId node_id,
1797  HAPI_Bool evaluate,
1798  HAPI_StringHandle * values_array,
1799  int start, int length );
1800 
1801 /// @brief Extract a file specified by path on a parameter. This will copy
1802 /// the file to the destination directory from wherever it might be,
1803 /// inlcuding inside the asset definition or online.
1804 ///
1805 /// @param[in] session
1806 /// The session of Houdini you are interacting with.
1807 /// See @ref HAPI_Sessions for more on sessions.
1808 /// Pass NULL to just use the default in-process session.
1809 ///
1810 /// @param[in] node_id
1811 /// The node id.
1812 ///
1813 /// @param[in] parm_name
1814 /// The name of the parameter.
1815 ///
1816 /// @param[in] destination_directory
1817 /// The destination directory to copy the file to.
1818 ///
1819 /// @param[in] destination_file_name
1820 /// The destination file name.
1821 ///
1822 HAPI_DECL HAPI_GetParmFile( const HAPI_Session * session,
1823  HAPI_NodeId node_id,
1824  const char * parm_name,
1825  const char * destination_directory,
1826  const char * destination_file_name );
1827 
1828 /// @brief Fill an array of ::HAPI_ParmChoiceInfo structs with parameter
1829 /// choice list information from the asset instance node.
1830 ///
1831 /// @param[in] session
1832 /// The session of Houdini you are interacting with.
1833 /// See @ref HAPI_Sessions for more on sessions.
1834 /// Pass NULL to just use the default in-process session.
1835 ///
1836 /// @param[in] node_id
1837 /// The node id.
1838 ///
1839 /// @param[out] parm_choices_array
1840 /// Array of ::HAPI_ParmChoiceInfo exactly the size of
1841 /// length.
1842 ///
1843 /// @param[in] start
1844 /// First index of range. Must be at least 0 and at
1845 /// most ::HAPI_NodeInfo::parmChoiceCount - 1.
1846 ///
1847 /// @param[in] length
1848 /// Must be at least 1 and at most
1849 /// ::HAPI_NodeInfo::parmChoiceCount - start.
1850 ///
1852  HAPI_NodeId node_id,
1853  HAPI_ParmChoiceInfo *parm_choices_array,
1854  int start, int length );
1855 
1856 /// @brief Set single parm int value by name.
1857 ///
1858 /// @note Regardless of the value, when calling this function
1859 /// on a parameter, if that parameter has a callback function
1860 /// attached to it, that callback function will be called. For
1861 /// example, if the parameter is a button the button will be
1862 /// pressed.
1863 ///
1864 /// @note In threaded mode, this is an _async call_!
1865 ///
1866 /// This API will invoke the cooking thread if threading is
1867 /// enabled. This means it will return immidiately. Use
1868 /// the status and cooking count APIs under DIAGNOSTICS to get
1869 /// a sense of the progress. All other API calls will block
1870 /// until the cook operation has finished.
1871 ///
1872 /// Also note that the cook result won't be of type
1873 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1874 /// Whenever the threading cook is done it will fill the
1875 /// @a cook result which is queried using
1876 /// ::HAPI_STATUS_COOK_RESULT.
1877 ///
1878 /// @param[in] session
1879 /// The session of Houdini you are interacting with.
1880 /// See @ref HAPI_Sessions for more on sessions.
1881 /// Pass NULL to just use the default in-process session.
1882 ///
1883 /// @param[in] node_id
1884 /// The node id.
1885 ///
1886 /// @param[in] parm_name
1887 /// The parm name.
1888 ///
1889 /// @param[in] index
1890 /// Index within the parameter's values tuple.
1891 ///
1892 /// @param[in] value
1893 /// The int value.
1894 ///
1896  HAPI_NodeId node_id,
1897  const char * parm_name,
1898  int index,
1899  int value );
1900 
1901 /// @brief Set (push) an array of parameter int values.
1902 ///
1903 /// @note Regardless of the values, when calling this function
1904 /// on a set of parameters, if any parameter has a callback
1905 /// function attached to it, that callback function will be called.
1906 /// For example, if the parameter is a button the button will be
1907 /// pressed.
1908 ///
1909 /// @note In threaded mode, this is an _async call_!
1910 ///
1911 /// This API will invoke the cooking thread if threading is
1912 /// enabled. This means it will return immidiately. Use
1913 /// the status and cooking count APIs under DIAGNOSTICS to get
1914 /// a sense of the progress. All other API calls will block
1915 /// until the cook operation has finished.
1916 ///
1917 /// Also note that the cook result won't be of type
1918 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1919 /// Whenever the threading cook is done it will fill the
1920 /// @a cook result which is queried using
1921 /// ::HAPI_STATUS_COOK_RESULT.
1922 ///
1923 /// @param[in] session
1924 /// The session of Houdini you are interacting with.
1925 /// See @ref HAPI_Sessions for more on sessions.
1926 /// Pass NULL to just use the default in-process session.
1927 ///
1928 /// @param[in] node_id
1929 /// The node id.
1930 ///
1931 /// @param[in] values_array
1932 /// Array of ints at least the size of length.
1933 ///
1934 /// @param[in] start
1935 /// First index of range. Must be at least 0 and at
1936 /// most ::HAPI_NodeInfo::parmIntValueCount - 1.
1937 ///
1938 /// @param[in] length
1939 /// Must be at least 1 and at most
1940 /// ::HAPI_NodeInfo::parmIntValueCount - start.
1941 ///
1943  HAPI_NodeId node_id,
1944  const int * values_array,
1945  int start, int length );
1946 
1947 /// @brief Set single parm float value by name.
1948 ///
1949 /// @note Regardless of the value, when calling this function
1950 /// on a parameter, if that parameter has a callback function
1951 /// attached to it, that callback function will be called. For
1952 /// example, if the parameter is a button the button will be
1953 /// pressed.
1954 ///
1955 /// @note In threaded mode, this is an _async call_!
1956 ///
1957 /// This API will invoke the cooking thread if threading is
1958 /// enabled. This means it will return immidiately. Use
1959 /// the status and cooking count APIs under DIAGNOSTICS to get
1960 /// a sense of the progress. All other API calls will block
1961 /// until the cook operation has finished.
1962 ///
1963 /// Also note that the cook result won't be of type
1964 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1965 /// Whenever the threading cook is done it will fill the
1966 /// @a cook result which is queried using
1967 /// ::HAPI_STATUS_COOK_RESULT.
1968 ///
1969 /// @param[in] session
1970 /// The session of Houdini you are interacting with.
1971 /// See @ref HAPI_Sessions for more on sessions.
1972 /// Pass NULL to just use the default in-process session.
1973 ///
1974 /// @param[in] node_id
1975 /// The node id.
1976 ///
1977 /// @param[in] parm_name
1978 /// The parm name.
1979 ///
1980 /// @param[in] index
1981 /// Index within the parameter's values tuple.
1982 ///
1983 /// @param[in] value
1984 /// The float value.
1985 ///
1987  HAPI_NodeId node_id,
1988  const char * parm_name,
1989  int index,
1990  float value );
1991 
1992 /// @brief Set (push) an array of parameter float values.
1993 ///
1994 /// @note Regardless of the values, when calling this function
1995 /// on a set of parameters, if any parameter has a callback
1996 /// function attached to it, that callback function will be called.
1997 /// For example, if the parameter is a button the button will be
1998 /// pressed.
1999 ///
2000 /// @note In threaded mode, this is an _async call_!
2001 ///
2002 /// This API will invoke the cooking thread if threading is
2003 /// enabled. This means it will return immidiately. Use
2004 /// the status and cooking count APIs under DIAGNOSTICS to get
2005 /// a sense of the progress. All other API calls will block
2006 /// until the cook operation has finished.
2007 ///
2008 /// Also note that the cook result won't be of type
2009 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
2010 /// Whenever the threading cook is done it will fill the
2011 /// @a cook result which is queried using
2012 /// ::HAPI_STATUS_COOK_RESULT.
2013 ///
2014 /// @param[in] session
2015 /// The session of Houdini you are interacting with.
2016 /// See @ref HAPI_Sessions for more on sessions.
2017 /// Pass NULL to just use the default in-process session.
2018 ///
2019 /// @param[in] node_id
2020 /// The node id.
2021 ///
2022 /// @param[in] values_array
2023 /// Array of floats at least the size of length.
2024 ///
2025 /// @param[in] start
2026 /// First index of range. Must be at least 0 and at
2027 /// most ::HAPI_NodeInfo::parmFloatValueCount - 1.
2028 ///
2029 /// @param[in] length
2030 /// Must be at least 1 and at most
2031 /// ::HAPI_NodeInfo::parmFloatValueCount - start.
2032 ///
2034  HAPI_NodeId node_id,
2035  const float * values_array,
2036  int start, int length );
2037 
2038 /// @brief Set (push) a string value. We can only set a single value at
2039 /// a time because we want to avoid fixed size string buffers.
2040 ///
2041 /// @note Regardless of the value, when calling this function
2042 /// on a parameter, if that parameter has a callback function
2043 /// attached to it, that callback function will be called. For
2044 /// example, if the parameter is a button the button will be
2045 /// pressed.
2046 ///
2047 /// @note In threaded mode, this is an _async call_!
2048 ///
2049 /// This API will invoke the cooking thread if threading is
2050 /// enabled. This means it will return immidiately. Use
2051 /// the status and cooking count APIs under DIAGNOSTICS to get
2052 /// a sense of the progress. All other API calls will block
2053 /// until the cook operation has finished.
2054 ///
2055 /// Also note that the cook result won't be of type
2056 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
2057 /// Whenever the threading cook is done it will fill the
2058 /// @a cook result which is queried using
2059 /// ::HAPI_STATUS_COOK_RESULT.
2060 ///
2061 /// @param[in] session
2062 /// The session of Houdini you are interacting with.
2063 /// See @ref HAPI_Sessions for more on sessions.
2064 /// Pass NULL to just use the default in-process session.
2065 ///
2066 /// @param[in] node_id
2067 /// The node id.
2068 ///
2069 /// @param[in] value
2070 /// The string value.
2071 ///
2072 /// @param[in] parm_id
2073 /// Parameter id of the parameter being updated.
2074 ///
2075 /// @param[in] index
2076 /// Index within the parameter's values tuple.
2077 ///
2079  HAPI_NodeId node_id,
2080  const char * value,
2081  HAPI_ParmId parm_id, int index );
2082 
2083 /// @brief Insert an instance of a multiparm before instance_position.
2084 ///
2085 /// @param[in] session
2086 /// The session of Houdini you are interacting with.
2087 /// See @ref HAPI_Sessions for more on sessions.
2088 /// Pass NULL to just use the default in-process session.
2089 ///
2090 /// @param[in] node_id
2091 /// The node id.
2092 ///
2093 /// @param[in] parm_id
2094 /// A parm id given by a ::HAPI_ParmInfo struct that
2095 /// has type ::HAPI_PARMTYPE_MULTIPARMLIST.
2096 ///
2097 /// @param[in] instance_position
2098 /// The new instance will be inserted at this position
2099 /// index. Do note the multiparms can start at position
2100 /// 1 or 0. Use ::HAPI_ParmInfo::instanceStartOffset to
2101 /// distinguish.
2102 ///
2104  HAPI_NodeId node_id,
2105  HAPI_ParmId parm_id,
2106  int instance_position );
2107 
2108 /// @brief Remove the instance of a multiparm given by instance_position.
2109 ///
2110 /// @param[in] session
2111 /// The session of Houdini you are interacting with.
2112 /// See @ref HAPI_Sessions for more on sessions.
2113 /// Pass NULL to just use the default in-process session.
2114 ///
2115 /// @param[in] node_id
2116 /// The node id.
2117 ///
2118 /// @param[in] parm_id
2119 /// A parm id given by a ::HAPI_ParmInfo struct that
2120 /// has type ::HAPI_PARMTYPE_MULTIPARMLIST.
2121 ///
2122 /// @param[in] instance_position
2123 /// The instance at instance_position will removed.
2124 ///
2126  HAPI_NodeId node_id,
2127  HAPI_ParmId parm_id,
2128  int instance_position );
2129 
2130 // HANDLES ------------------------------------------------------------------
2131 
2132 /// @brief Fill an array of ::HAPI_HandleInfo structs with information
2133 /// about every exposed user manipulation handle on the asset.
2134 ///
2135 /// @param[in] session
2136 /// The session of Houdini you are interacting with.
2137 /// See @ref HAPI_Sessions for more on sessions.
2138 /// Pass NULL to just use the default in-process session.
2139 ///
2140 /// @param[in] asset_id
2141 /// The asset id.
2142 ///
2143 /// @param[out] handle_infos_array
2144 /// Array of ::HAPI_HandleInfo at least the size of length.
2145 ///
2146 /// @param[in] start
2147 /// First index of range. Must be at least 0 and at
2148 /// most ::HAPI_AssetInfo::handleCount - 1.
2149 ///
2150 /// @param[in] length
2151 /// Must be at least 1 and at most
2152 /// ::HAPI_AssetInfo::handleCount - start.
2153 ///
2154 HAPI_DECL HAPI_GetHandleInfo( const HAPI_Session * session,
2155  HAPI_AssetId asset_id,
2156  HAPI_HandleInfo * handle_infos_array,
2157  int start, int length );
2158 
2159 /// @brief Fill an array of ::HAPI_HandleInfo structs with information
2160 /// about every exposed user manipulation handle on the asset.
2161 ///
2162 /// @param[in] session
2163 /// The session of Houdini you are interacting with.
2164 /// See @ref HAPI_Sessions for more on sessions.
2165 /// Pass NULL to just use the default in-process session.
2166 ///
2167 /// @param[in] asset_id
2168 /// The asset id.
2169 ///
2170 /// @param[in] handle_index
2171 /// The index of the handle, from 0 to handleCount - 1
2172 /// from the call to ::HAPI_GetAssetInfo().
2173 ///
2174 /// @param[out] handle_binding_infos_array
2175 /// Array of ::HAPI_HandleBindingInfo at least the size
2176 /// of length.
2177 ///
2178 /// @param[in] start
2179 /// First index of range. Must be at least 0 and at
2180 /// most ::HAPI_HandleInfo::bindingsCount - 1.
2181 ///
2182 /// @param[in] length
2183 /// Must be at least 0 and at most
2184 /// ::HAPI_HandleInfo::bindingsCount - start.
2185 ///
2187  const HAPI_Session * session,
2188  HAPI_AssetId asset_id,
2189  int handle_index,
2190  HAPI_HandleBindingInfo * handle_binding_infos_array,
2191  int start, int length );
2192 
2193 // PRESETS ------------------------------------------------------------------
2194 
2195 /// @brief Generate a preset blob of the current state of all the
2196 /// parameter values, cache it, and return its size in bytes.
2197 ///
2198 /// @param[in] session
2199 /// The session of Houdini you are interacting with.
2200 /// See @ref HAPI_Sessions for more on sessions.
2201 /// Pass NULL to just use the default in-process session.
2202 ///
2203 /// @param[in] node_id
2204 /// The exposed node id.
2205 ///
2206 /// @param[in] preset_type
2207 /// The preset type.
2208 ///
2209 /// @param[in] preset_name
2210 /// Optional. This is only used if the @p preset_type is
2211 /// ::HAPI_PRESETTYPE_IDX. If NULL is given, the preset
2212 /// name will be the same as the name of the node with
2213 /// the given @p node_id.
2214 ///
2215 /// @param[out] buffer_length
2216 /// Size of the buffer.
2217 ///
2219  HAPI_NodeId node_id,
2220  HAPI_PresetType preset_type,
2221  const char * preset_name,
2222  int * buffer_length );
2223 
2224 /// @brief Generates a preset for the given asset.
2225 ///
2226 /// @param[in] session
2227 /// The session of Houdini you are interacting with.
2228 /// See @ref HAPI_Sessions for more on sessions.
2229 /// Pass NULL to just use the default in-process session.
2230 ///
2231 /// @param[in] node_id
2232 /// The exposed node id.
2233 ///
2234 /// @param[out] buffer
2235 /// Buffer to hold the preset data.
2236 ///
2237 /// @param[in] buffer_length
2238 /// Size of the buffer. Should be the same as the length
2239 /// returned by ::HAPI_GetPresetBufLength().
2240 ///
2241 HAPI_DECL HAPI_GetPreset( const HAPI_Session * session,
2242  HAPI_NodeId node_id,
2243  char * buffer,
2244  int buffer_length );
2245 
2246 /// @brief Sets a particular asset to a given preset.
2247 ///
2248 /// @param[in] session
2249 /// The session of Houdini you are interacting with.
2250 /// See @ref HAPI_Sessions for more on sessions.
2251 /// Pass NULL to just use the default in-process session.
2252 ///
2253 /// @param[in] node_id
2254 /// The exposed node id.
2255 ///
2256 /// @param[in] preset_type
2257 /// The preset type.
2258 ///
2259 /// @param[in] preset_name
2260 /// Optional. This is only used if the @p preset_type is
2261 /// ::HAPI_PRESETTYPE_IDX. If NULL is give, the first
2262 /// preset in the IDX file will be chosen.
2263 ///
2264 /// @param[in] buffer
2265 /// Buffer to hold the preset data.
2266 ///
2267 /// @param[in] buffer_length
2268 /// Size of the buffer.
2269 ///
2270 HAPI_DECL HAPI_SetPreset( const HAPI_Session * session,
2271  HAPI_NodeId node_id,
2272  HAPI_PresetType preset_type,
2273  const char * preset_name,
2274  const char * buffer,
2275  int buffer_length );
2276 
2277 // OBJECTS ------------------------------------------------------------------
2278 
2279 /// @brief Fill an array of ::HAPI_ObjectInfo structs with information
2280 /// on each visible object in the scene that has a SOP network
2281 /// (is not a sub-network).
2282 /// Note that this function will reset all the objects'
2283 /// ::HAPI_ObjectInfo.haveGeosChanged flags to false after
2284 /// it returns the original flag values.
2285 ///
2286 /// @param[in] session
2287 /// The session of Houdini you are interacting with.
2288 /// See @ref HAPI_Sessions for more on sessions.
2289 /// Pass NULL to just use the default in-process session.
2290 ///
2291 /// @param[in] asset_id
2292 /// The asset id.
2293 ///
2294 /// @param[out] object_infos_array
2295 /// Array of ::HAPI_ObjectInfo at least the size of
2296 /// length.
2297 ///
2298 /// @param[in] start
2299 /// First object index to begin fill. Must be at least
2300 /// 0 and at most length - 1.
2301 ///
2302 /// @param[in] length
2303 /// Must be at least 0 and at most
2304 /// ::HAPI_AssetInfo::objectCount - start.
2305 ///
2306 HAPI_DECL HAPI_GetObjects( const HAPI_Session * session,
2307  HAPI_AssetId asset_id,
2308  HAPI_ObjectInfo * object_infos_array,
2309  int start, int length );
2310 
2311 /// @brief Fill an array of ::HAPI_Transform structs with the transforms
2312 /// of each visible object in the scene that has a SOP network
2313 /// (is not a sub-network).
2314 /// Note that this function will reset all the objects'
2315 /// ::HAPI_ObjectInfo::hasTransformChanged flags to false after
2316 /// it returns the original flag values.
2317 ///
2318 /// @param[in] session
2319 /// The session of Houdini you are interacting with.
2320 /// See @ref HAPI_Sessions for more on sessions.
2321 /// Pass NULL to just use the default in-process session.
2322 ///
2323 /// @param[in] asset_id
2324 /// The asset id.
2325 ///
2326 /// @param[in] rst_order
2327 /// The order of application of translation, rotation and
2328 /// scale.
2329 ///
2330 /// @param[out] transforms_array
2331 /// Array of ::HAPI_Transform at least the size of
2332 /// length.
2333 ///
2334 /// @param[in] start
2335 /// First index of range. Must be at least 0 and at
2336 /// most ::HAPI_AssetInfo::objectCount - 1.
2337 ///
2338 /// @param[in] length
2339 /// Must be at least 0 and at most
2340 /// ::HAPI_AssetInfo::objectCount - start.
2341 ///
2343  HAPI_AssetId asset_id,
2344  HAPI_RSTOrder rst_order,
2345  HAPI_Transform * transforms_array,
2346  int start, int length );
2347 
2348 /// @brief Fill an array of ::HAPI_Transform structs with the transforms
2349 /// of each instance of this instancer object
2350 ///
2351 /// @param[in] session
2352 /// The session of Houdini you are interacting with.
2353 /// See @ref HAPI_Sessions for more on sessions.
2354 /// Pass NULL to just use the default in-process session.
2355 ///
2356 /// @param[in] asset_id
2357 /// The asset id.
2358 ///
2359 /// @param[in] object_id
2360 /// The object id.
2361 ///
2362 /// @param[in] geo_id
2363 /// The geometry id.
2364 ///
2365 /// @param[in] rst_order
2366 /// The order of application of translation, rotation and
2367 /// scale.
2368 ///
2369 /// @param[out] transforms_array
2370 /// Array of ::HAPI_Transform at least the size of length.
2371 ///
2372 /// @param[in] start
2373 /// First index of range. Must be at least 0 and at
2374 /// most ::HAPI_PartInfo::pointCount - 1.
2375 ///
2376 /// @param[in] length
2377 /// Must be at least 0 and at most
2378 /// ::HAPI_PartInfo::pointCount - @p start.
2379 ///
2381  HAPI_AssetId asset_id,
2382  HAPI_ObjectId object_id,
2383  HAPI_GeoId geo_id,
2384  HAPI_RSTOrder rst_order,
2385  HAPI_Transform * transforms_array,
2386  int start, int length );
2387 
2388 /// @brief Set the transform of an individual object. This is mostly used
2389 /// with marshaled geometry objects. Trying to modify the
2390 /// transform of an object belonging to an asset other than
2391 /// the special External Input Asset with object id 0 will most
2392 /// likely fail, unless the transforms are exposed as editable
2393 /// via exposed parameters.
2394 ///
2395 /// @param[in] session
2396 /// The session of Houdini you are interacting with.
2397 /// See @ref HAPI_Sessions for more on sessions.
2398 /// Pass NULL to just use the default in-process session.
2399 ///
2400 /// @param[in] asset_id
2401 /// The asset id.
2402 ///
2403 /// @param[in] object_id
2404 /// The object id.
2405 ///
2406 /// @param[in] transform
2407 /// A ::HAPI_TransformEuler that stores the transform.
2408 ///
2410  HAPI_AssetId asset_id,
2411  HAPI_ObjectId object_id,
2412  const HAPI_TransformEuler * transform );
2413 
2414 // GEOMETRY GETTERS ---------------------------------------------------------
2415 
2416 /// @brief Get the main geometry info struct (::HAPI_GeoInfo). Note that
2417 /// this function will reset all the geo_infos'
2418 /// ::HAPI_GeoInfo::hasGeoChanged flags to false after it returns
2419 /// the original flag values.
2420 ///
2421 /// @param[in] session
2422 /// The session of Houdini you are interacting with.
2423 /// See @ref HAPI_Sessions for more on sessions.
2424 /// Pass NULL to just use the default in-process session.
2425 ///
2426 /// @param[in] asset_id
2427 /// The asset id.
2428 ///
2429 /// @param[in] object_id
2430 /// The object id.
2431 ///
2432 /// @param[in] geo_id
2433 /// The geometry id.
2434 ///
2435 /// @param[out] geo_info
2436 /// ::HAPI_GeoInfo return value.
2437 ///
2438 HAPI_DECL HAPI_GetGeoInfo( const HAPI_Session * session,
2439  HAPI_AssetId asset_id,
2440  HAPI_ObjectId object_id,
2441  HAPI_GeoId geo_id,
2442  HAPI_GeoInfo * geo_info );
2443 
2444 /// @brief Get a particular part info struct.
2445 ///
2446 /// @param[in] session
2447 /// The session of Houdini you are interacting with.
2448 /// See @ref HAPI_Sessions for more on sessions.
2449 /// Pass NULL to just use the default in-process session.
2450 ///
2451 /// @param[in] asset_id
2452 /// The asset id.
2453 ///
2454 /// @param[in] object_id
2455 /// The object id.
2456 ///
2457 /// @param[in] geo_id
2458 /// The geometry id.
2459 ///
2460 /// @param[in] part_id
2461 /// The part id.
2462 ///
2463 /// @param[out] part_info
2464 /// ::HAPI_PartInfo return value.
2465 ///
2466 HAPI_DECL HAPI_GetPartInfo( const HAPI_Session * session,
2467  HAPI_AssetId asset_id, HAPI_ObjectId object_id,
2468  HAPI_GeoId geo_id, HAPI_PartId part_id,
2469  HAPI_PartInfo * part_info );
2470 
2471 /// @brief Get the array of faces where the nth integer in the array is
2472 /// the number of vertices the nth face has.
2473 ///
2474 /// @param[in] session
2475 /// The session of Houdini you are interacting with.
2476 /// See @ref HAPI_Sessions for more on sessions.
2477 /// Pass NULL to just use the default in-process session.
2478 ///
2479 /// @param[in] asset_id
2480 /// The asset id.
2481 ///
2482 /// @param[in] object_id
2483 /// The object id.
2484 ///
2485 /// @param[in] geo_id
2486 /// The geometry id.
2487 ///
2488 /// @param[in] part_id
2489 /// The part id.
2490 ///
2491 /// @param[out] face_counts_array
2492 /// An integer array at least the size of length.
2493 ///
2494 /// @param[in] start
2495 /// First index of range. Must be at least 0 and at
2496 /// most ::HAPI_PartInfo::faceCount - 1.
2497 ///
2498 /// @param[in] length
2499 /// Must be at least 0 and at most
2500 /// ::HAPI_PartInfo::faceCount - @p start.
2501 ///
2502 HAPI_DECL HAPI_GetFaceCounts( const HAPI_Session * session,
2503  HAPI_AssetId asset_id,
2504  HAPI_ObjectId object_id,
2505  HAPI_GeoId geo_id,
2506  HAPI_PartId part_id,
2507  int * face_counts_array,
2508  int start, int length );
2509 
2510 /// @brief Get array containing the vertex-point associations where the
2511 /// ith element in the array is the point index the ith vertex
2512 /// associates with.
2513 ///
2514 /// @param[in] session
2515 /// The session of Houdini you are interacting with.
2516 /// See @ref HAPI_Sessions for more on sessions.
2517 /// Pass NULL to just use the default in-process session.
2518 ///
2519 /// @param[in] asset_id
2520 /// The asset id.
2521 ///
2522 /// @param[in] object_id
2523 /// The object id.
2524 ///
2525 /// @param[in] geo_id
2526 /// The geometry id.
2527 ///
2528 /// @param[in] part_id
2529 /// The part id.
2530 ///
2531 /// @param[out] vertex_list_array
2532 /// An integer array at least the size of length.
2533 ///
2534 /// @param[in] start
2535 /// First index of range. Must be at least 0 and at
2536 /// most ::HAPI_PartInfo::vertexCount - 1.
2537 ///
2538 /// @param[in] length
2539 /// Must be at least 0 and at most
2540 /// ::HAPI_PartInfo::vertexCount - @p start.
2541 ///
2542 HAPI_DECL HAPI_GetVertexList( const HAPI_Session * session,
2543  HAPI_AssetId asset_id,
2544  HAPI_ObjectId object_id,
2545  HAPI_GeoId geo_id,
2546  HAPI_PartId part_id,
2547  int * vertex_list_array,
2548  int start, int length );
2549 
2550 /// @brief Get the main geometry info struct (::HAPI_GeoInfo).
2551 ///
2552 /// @param[in] session
2553 /// The session of Houdini you are interacting with.
2554 /// See @ref HAPI_Sessions for more on sessions.
2555 /// Pass NULL to just use the default in-process session.
2556 ///
2557 /// @param[in] asset_id
2558 /// The asset id.
2559 ///
2560 /// @param[in] object_id
2561 /// The object id.
2562 ///
2563 /// @param[in] geo_id
2564 /// The geometry id.
2565 ///
2566 /// @param[in] part_id
2567 /// The part id.
2568 ///
2569 /// @param[in] name
2570 /// Attribute name.
2571 ///
2572 /// @param[in] owner
2573 /// Attribute owner.
2574 ///
2575 /// @param[out] attr_info
2576 /// ::HAPI_AttributeInfo to be filled. Check
2577 /// ::HAPI_AttributeInfo::exists to see if this attribute
2578 /// exists.
2579 ///
2581  HAPI_AssetId asset_id,
2582  HAPI_ObjectId object_id,
2583  HAPI_GeoId geo_id,
2584  HAPI_PartId part_id,
2585  const char * name,
2586  HAPI_AttributeOwner owner,
2587  HAPI_AttributeInfo * attr_info );
2588 
2589 /// @brief Get list of attribute names by attribute owner. Note that the
2590 /// name string handles are only valid until the next time this
2591 /// function is called.
2592 ///
2593 /// @param[in] session
2594 /// The session of Houdini you are interacting with.
2595 /// See @ref HAPI_Sessions for more on sessions.
2596 /// Pass NULL to just use the default in-process session.
2597 ///
2598 /// @param[in] asset_id
2599 /// The asset id.
2600 ///
2601 /// @param[in] object_id
2602 /// The object id.
2603 ///
2604 /// @param[in] geo_id
2605 /// The geometry id.
2606 ///
2607 /// @param[in] part_id
2608 /// The part id.
2609 ///
2610 /// @param[in] owner
2611 /// The ::HAPI_AttributeOwner enum value specifying the
2612 /// owner of the attribute.
2613 ///
2614 /// @param[out] attribute_names_array
2615 /// Array of ints (string handles) to house the
2616 /// attribute names. Should be exactly the size of the
2617 /// appropriate attribute owner type count
2618 /// in ::HAPI_PartInfo.
2619 ///
2620 /// @param[in] count
2621 /// Sanity check count. Must be equal to the appropriate
2622 /// attribute owner type count in ::HAPI_PartInfo.
2623 ///
2625  HAPI_AssetId asset_id,
2626  HAPI_ObjectId object_id,
2627  HAPI_GeoId geo_id,
2628  HAPI_PartId part_id,
2629  HAPI_AttributeOwner owner,
2630  HAPI_StringHandle *attribute_names_array,
2631  int count );
2632 
2633 /// @brief Get attribute integer data.
2634 ///
2635 /// @param[in] session
2636 /// The session of Houdini you are interacting with.
2637 /// See @ref HAPI_Sessions for more on sessions.
2638 /// Pass NULL to just use the default in-process session.
2639 ///
2640 /// @param[in] asset_id
2641 /// The asset id.
2642 ///
2643 /// @param[in] object_id
2644 /// The object id.
2645 ///
2646 /// @param[in] geo_id
2647 /// The geometry id.
2648 ///
2649 /// @param[in] part_id
2650 /// The part id.
2651 ///
2652 /// @param[in] name
2653 /// Attribute name.
2654 ///
2655 /// @param[in] attr_info
2656 /// ::HAPI_AttributeInfo used as input for what tuple size.
2657 /// you want. Also contains some sanity checks like
2658 /// data type. Generally should be the same struct
2659 /// returned by ::HAPI_GetAttributeInfo().
2660 ///
2661 /// @param[out] data_array
2662 /// An integer array at least the size of length.
2663 ///
2664 /// @param[in] start
2665 /// First index of range. Must be at least 0 and at
2666 /// most ::HAPI_AttributeInfo::count - 1.
2667 ///
2668 /// @param[in] length
2669 /// Must be at least 0 and at most
2670 /// ::HAPI_AttributeInfo::count - @p start.
2671 ///
2673  HAPI_AssetId asset_id,
2674  HAPI_ObjectId object_id,
2675  HAPI_GeoId geo_id,
2676  HAPI_PartId part_id,
2677  const char * name,
2678  HAPI_AttributeInfo * attr_info,
2679  int * data_array,
2680  int start, int length );
2681 
2682 /// @brief Get attribute 64-bit integer data.
2683 ///
2684 /// @param[in] session
2685 /// The session of Houdini you are interacting with.
2686 /// See @ref HAPI_Sessions for more on sessions.
2687 /// Pass NULL to just use the default in-process session.
2688 ///
2689 /// @param[in] asset_id
2690 /// The asset id.
2691 ///
2692 /// @param[in] object_id
2693 /// The object id.
2694 ///
2695 /// @param[in] geo_id
2696 /// The geometry id.
2697 ///
2698 /// @param[in] part_id
2699 /// The part id.
2700 ///
2701 /// @param[in] name
2702 /// Attribute name.
2703 ///
2704 /// @param[in] attr_info
2705 /// ::HAPI_AttributeInfo used as input for what tuple size.
2706 /// you want. Also contains some sanity checks like
2707 /// data type. Generally should be the same struct
2708 /// returned by ::HAPI_GetAttributeInfo().
2709 ///
2710 /// @param[in] stride
2711 /// Specifies how many items to skip over for each element.
2712 /// With a stride of -1, the stride will be set to
2713 /// @c attr_info->tuple_size. Otherwise, the stride will be
2714 /// set to the maximum of @c attr_info->tuple_size and
2715 /// @c stride.
2716 ///
2717 /// @param[out] data_array
2718 /// An 64-bit integer array at least the size of length.
2719 ///
2720 /// @param[in] start
2721 /// First index of range. Must be at least 0 and at
2722 /// most ::HAPI_AttributeInfo::count - 1.
2723 ///
2724 /// @param[in] length
2725 /// Must be at least 0 and at most
2726 /// ::HAPI_AttributeInfo::count - @p start.
2727 /// Note, if 0 is passed for length, the function will just
2728 /// do nothing and return ::HAPI_RESULT_SUCCESS.
2729 ///
2731  HAPI_AssetId asset_id,
2732  HAPI_ObjectId object_id,
2733  HAPI_GeoId geo_id,
2734  HAPI_PartId part_id,
2735  const char * name,
2736  HAPI_AttributeInfo * attr_info,
2737  int stride,
2738  HAPI_Int64 * data_array,
2739  int start, int length );
2740 
2741 /// @brief Get attribute float data.
2742 ///
2743 /// @param[in] session
2744 /// The session of Houdini you are interacting with.
2745 /// See @ref HAPI_Sessions for more on sessions.
2746 /// Pass NULL to just use the default in-process session.
2747 ///
2748 /// @param[in] asset_id
2749 /// The asset id.
2750 ///
2751 /// @param[in] object_id
2752 /// The object id.
2753 ///
2754 /// @param[in] geo_id
2755 /// The geometry id.
2756 ///
2757 /// @param[in] part_id
2758 /// The part id.
2759 ///
2760 /// @param[in] name
2761 /// Attribute name.
2762 ///
2763 /// @param[in] attr_info
2764 /// ::HAPI_AttributeInfo used as input for what tuple size.
2765 /// you want. Also contains some sanity checks like
2766 /// data type. Generally should be the same struct
2767 /// returned by ::HAPI_GetAttributeInfo().
2768 ///
2769 /// @param[out] data_array
2770 /// An float array at least the size of length.
2771 ///
2772 /// @param[in] start
2773 /// First index of range. Must be at least 0 and at
2774 /// most ::HAPI_AttributeInfo::count - 1.
2775 ///
2776 /// @param[in] length
2777 /// Must be at least 0 and at most
2778 /// ::HAPI_AttributeInfo::count - @p start.
2779 ///
2781  HAPI_AssetId asset_id,
2782  HAPI_ObjectId object_id,
2783  HAPI_GeoId geo_id,
2784  HAPI_PartId part_id,
2785  const char * name,
2786  HAPI_AttributeInfo * attr_info,
2787  float * data_array,
2788  int start, int length );
2789 
2790 /// @brief Get 64-bit attribute float data.
2791 ///
2792 /// @param[in] session
2793 /// The session of Houdini you are interacting with.
2794 /// See @ref HAPI_Sessions for more on sessions.
2795 /// Pass NULL to just use the default in-process session.
2796 ///
2797 /// @param[in] asset_id
2798 /// The asset id.
2799 ///
2800 /// @param[in] object_id
2801 /// The object id.
2802 ///
2803 /// @param[in] geo_id
2804 /// The geometry id.
2805 ///
2806 /// @param[in] part_id
2807 /// The part id.
2808 ///
2809 /// @param[in] name
2810 /// Attribute name.
2811 ///
2812 /// @param[in] attr_info
2813 /// ::HAPI_AttributeInfo used as input for what tuple size.
2814 /// you want. Also contains some sanity checks like
2815 /// data type. Generally should be the same struct
2816 /// returned by ::HAPI_GetAttributeInfo().
2817 ///
2818 /// @param[in] stride
2819 /// Specifies how many items to skip over for each element.
2820 /// With a stride of -1, the stride will be set to
2821 /// @c attr_info->tuple_size. Otherwise, the stride will be
2822 /// set to the maximum of @c attr_info->tuple_size and
2823 /// @c stride.
2824 ///
2825 /// @param[out] data_array
2826 /// An 64-bit float array at least the size of length.
2827 ///
2828 /// @param[in] start
2829 /// First index of range. Must be at least 0 and at
2830 /// most ::HAPI_AttributeInfo::count - 1.
2831 ///
2832 /// @param[in] length
2833 /// Must be at least 0 and at most
2834 /// ::HAPI_AttributeInfo::count - @p start.
2835 /// Note, if 0 is passed for length, the function will just
2836 /// do nothing and return ::HAPI_RESULT_SUCCESS.
2837 ///
2839  HAPI_AssetId asset_id,
2840  HAPI_ObjectId object_id,
2841  HAPI_GeoId geo_id,
2842  HAPI_PartId part_id,
2843  const char * name,
2844  HAPI_AttributeInfo * attr_info,
2845  int stride,
2846  double * data_array,
2847  int start, int length );
2848 
2849 /// @brief Get attribute string data. Note that the string handles
2850 /// returned are only valid until the next time this function
2851 /// is called.
2852 ///
2853 /// @param[in] session
2854 /// The session of Houdini you are interacting with.
2855 /// See @ref HAPI_Sessions for more on sessions.
2856 /// Pass NULL to just use the default in-process session.
2857 ///
2858 /// @param[in] asset_id
2859 /// The asset id.
2860 ///
2861 /// @param[in] object_id
2862 /// The object id.
2863 ///
2864 /// @param[in] geo_id
2865 /// The geometry id.
2866 ///
2867 /// @param[in] part_id
2868 /// The part id.
2869 ///
2870 /// @param[in] name
2871 /// Attribute name.
2872 ///
2873 /// @param[in] attr_info
2874 /// ::HAPI_AttributeInfo used as input for what tuple size.
2875 /// you want. Also contains some sanity checks like
2876 /// data type. Generally should be the same struct
2877 /// returned by ::HAPI_GetAttributeInfo().
2878 ///
2879 /// @param[out] data_array
2880 /// An int (string handles) array at least the
2881 /// size of length.
2882 ///
2883 /// @param[in] start
2884 /// First index of range. Must be at least 0 and at
2885 /// most ::HAPI_AttributeInfo::count - 1.
2886 ///
2887 /// @param[in] length
2888 /// Must be at least 0 and at most
2889 /// ::HAPI_AttributeInfo::count - @p start.
2890 ///
2892  HAPI_AssetId asset_id,
2893  HAPI_ObjectId object_id,
2894  HAPI_GeoId geo_id,
2895  HAPI_PartId part_id,
2896  const char * name,
2897  HAPI_AttributeInfo * attr_info,
2898  int * data_array,
2899  int start, int length );
2900 
2901 /// @brief Get group names for an entire geo. Please note that this
2902 /// function is NOT per-part, but it is per-geo. The companion
2903 /// function ::HAPI_GetGroupMembership() IS per-part. Also keep
2904 /// in mind that the name string handles are only
2905 /// valid until the next time this function is called.
2906 ///
2907 /// @param[in] session
2908 /// The session of Houdini you are interacting with.
2909 /// See @ref HAPI_Sessions for more on sessions.
2910 /// Pass NULL to just use the default in-process session.
2911 ///
2912 /// @param[in] asset_id
2913 /// The asset id.
2914 ///
2915 /// @param[in] object_id
2916 /// The object id.
2917 ///
2918 /// @param[in] geo_id
2919 /// The geometry id.
2920 ///
2921 /// @param[in] group_type
2922 /// The group type.
2923 ///
2924 /// @param[out] group_names_array
2925 /// The array of names to be filled. Should be the size
2926 /// given by ::HAPI_GeoInfo_GetGroupCountByType() with
2927 /// @p group_type and the ::HAPI_GeoInfo of @p geo_id.
2928 /// @note These string handles are only valid until the
2929 /// next call to ::HAPI_GetGroupNames().
2930 ///
2931 /// @param[in] group_count
2932 /// Sanity check. Should be less than or equal to the size
2933 /// of @p group_names.
2934 ///
2935 HAPI_DECL HAPI_GetGroupNames( const HAPI_Session * session,
2936  HAPI_AssetId asset_id,
2937  HAPI_ObjectId object_id,
2938  HAPI_GeoId geo_id,
2939  HAPI_GroupType group_type,
2940  HAPI_StringHandle * group_names_array,
2941  int group_count );
2942 
2943 /// @brief Get group membership.
2944 ///
2945 /// @param[in] session
2946 /// The session of Houdini you are interacting with.
2947 /// See @ref HAPI_Sessions for more on sessions.
2948 /// Pass NULL to just use the default in-process session.
2949 ///
2950 /// @param[in] asset_id
2951 /// The asset id.
2952 ///
2953 /// @param[in] object_id
2954 /// The object id.
2955 ///
2956 /// @param[in] geo_id
2957 /// The geometry id.
2958 ///
2959 /// @param[in] part_id
2960 /// The part id.
2961 ///
2962 /// @param[in] group_type
2963 /// The group type.
2964 ///
2965 /// @param[in] group_name
2966 /// The group name.
2967 ///
2968 /// @param[out] membership_array
2969 /// Array of ints that represent the membership of this
2970 /// group. Should be the size given by
2971 /// ::HAPI_PartInfo_GetElementCountByGroupType() with
2972 /// @p group_type and the ::HAPI_PartInfo of @p part_id.
2973 ///
2974 /// @param[in] start
2975 /// Start offset into the membership array. Must be
2976 /// less than ::HAPI_PartInfo_GetElementCountByGroupType().
2977 ///
2978 /// @param[in] length
2979 /// Should be less than or equal to the size
2980 /// of @p membership.
2981 ///
2983  HAPI_AssetId asset_id,
2984  HAPI_ObjectId object_id,
2985  HAPI_GeoId geo_id,
2986  HAPI_PartId part_id,
2987  HAPI_GroupType group_type,
2988  const char * group_name,
2989  int * membership_array,
2990  int start, int length );
2991 
2992 /// @brief Get the part ids that this instancer part is instancing.
2993 ///
2994 /// @param[in] session
2995 /// The session of Houdini you are interacting with.
2996 /// See @ref HAPI_Sessions for more on sessions.
2997 /// Pass NULL to just use the default in-process session.
2998 ///
2999 /// @param[in] asset_id
3000 /// The asset id.
3001 ///
3002 /// @param[in] object_id
3003 /// The object id.
3004 ///
3005 /// @param[in] geo_id
3006 /// The geometry id.
3007 ///
3008 /// @param[in] part_id
3009 /// The instancer part id.
3010 ///
3011 /// @param[out] instanced_parts_array
3012 /// Array of ::HAPI_PartId's to instance.
3013 ///
3014 /// @param[in] start
3015 /// Should be less than @p part_id's
3016 /// ::HAPI_PartInfo::instancedPartCount but more than or
3017 /// equal to 0.
3018 ///
3019 /// @param[in] length
3020 /// Should be less than @p part_id's
3021 /// ::HAPI_PartInfo::instancedPartCount - @p start.
3022 ///
3024  HAPI_AssetId asset_id,
3025  HAPI_ObjectId object_id,
3026  HAPI_GeoId geo_id,
3027  HAPI_PartId part_id,
3028  HAPI_PartId * instanced_parts_array,
3029  int start, int length );
3030 
3031 /// @brief Get the instancer part's list of transforms on which to
3032 /// instance the instanced parts you got from
3033 /// ::HAPI_GetInstancedPartIds().
3034 ///
3035 /// @param[in] session
3036 /// The session of Houdini you are interacting with.
3037 /// See @ref HAPI_Sessions for more on sessions.
3038 /// Pass NULL to just use the default in-process session.
3039 ///
3040 /// @param[in] asset_id
3041 /// The asset id.
3042 ///
3043 /// @param[in] object_id
3044 /// The object id.
3045 ///
3046 /// @param[in] geo_id
3047 /// The geometry id.
3048 ///
3049 /// @param[in] part_id
3050 /// The instancer part id.
3051 ///
3052 /// @param[in] rst_order
3053 /// The order of application of translation, rotation and
3054 /// scale.
3055 ///
3056 /// @param[out] transforms_array
3057 /// Array of ::HAPI_PartId's to instance.
3058 ///
3059 /// @param[in] start
3060 /// Should be less than @p part_id's
3061 /// ::HAPI_PartInfo::instanceCount but more than or
3062 /// equal to 0.
3063 ///
3064 /// @param[in] length
3065 /// Should be less than @p part_id's
3066 /// ::HAPI_PartInfo::instanceCount - @p start.
3067 ///
3069  HAPI_AssetId asset_id,
3070  HAPI_ObjectId object_id,
3071  HAPI_GeoId geo_id,
3072  HAPI_PartId part_id,
3073  HAPI_RSTOrder rst_order,
3074  HAPI_Transform * transforms_array,
3075  int start, int length );
3076 
3077 // GEOMETRY SETTERS ---------------------------------------------------------
3078 
3079 /// @brief Set the main geometry info struct (::HAPI_GeoInfo).
3080 /// TODO: This function does nothing at the moment. (Placeholder)
3081 ///
3082 /// @param[in] session
3083 /// The session of Houdini you are interacting with.
3084 /// See @ref HAPI_Sessions for more on sessions.
3085 /// Pass NULL to just use the default in-process session.
3086 ///
3087 /// @param[in] asset_id
3088 /// The asset id.
3089 ///
3090 /// @param[in] object_id
3091 /// The object id.
3092 ///
3093 /// @param[in] geo_id
3094 /// The geometry id.
3095 ///
3096 /// @param[in] geo_info
3097 /// ::HAPI_GeoInfo value.
3098 ///
3099 HAPI_DECL HAPI_SetGeoInfo( const HAPI_Session * session,
3100  HAPI_AssetId asset_id,
3101  HAPI_ObjectId object_id,
3102  HAPI_GeoId geo_id,
3103  HAPI_GeoInfo * geo_info );
3104 
3105 /// @brief Set the main part info struct (::HAPI_PartInfo).
3106 ///
3107 /// @param[in] session
3108 /// The session of Houdini you are interacting with.
3109 /// See @ref HAPI_Sessions for more on sessions.
3110 /// Pass NULL to just use the default in-process session.
3111 ///
3112 /// @param[in] asset_id
3113 /// The asset id.
3114 ///
3115 /// @param[in] object_id
3116 /// The object id.
3117 ///
3118 /// @param[in] geo_id
3119 /// The geometry id.
3120 ///
3121 /// @param[in] part_info
3122 /// ::HAPI_PartInfo value that describes the input
3123 /// geometry.
3124 ///
3125 HAPI_DECL HAPI_SetPartInfo( const HAPI_Session * session,
3126  HAPI_AssetId asset_id,
3127  HAPI_ObjectId object_id,
3128  HAPI_GeoId geo_id,
3129  const HAPI_PartInfo * part_info );
3130 
3131 /// @brief Set the array of faces where the nth integer in the array is
3132 /// the number of vertices the nth face has.
3133 ///
3134 /// @param[in] session
3135 /// The session of Houdini you are interacting with.
3136 /// See @ref HAPI_Sessions for more on sessions.
3137 /// Pass NULL to just use the default in-process session.
3138 ///
3139 /// @param[in] asset_id
3140 /// The asset id.
3141 ///
3142 /// @param[in] object_id
3143 /// The object id.
3144 ///
3145 /// @param[in] geo_id
3146 /// The geometry id.
3147 ///
3148 /// @param[in] face_counts_array
3149 /// An integer array at least the size of @p length.
3150 ///
3151 /// @param[in] start
3152 /// First index of range. Must be at least 0 and at
3153 /// most ::HAPI_PartInfo::faceCount - 1.
3154 ///
3155 /// @param[in] length
3156 /// Must be at least 0 and at most
3157 /// ::HAPI_PartInfo::faceCount - @p start.
3158 ///
3159 HAPI_DECL HAPI_SetFaceCounts( const HAPI_Session * session,
3160  HAPI_AssetId asset_id,
3161  HAPI_ObjectId object_id,
3162  HAPI_GeoId geo_id,
3163  const int * face_counts_array,
3164  int start, int length );
3165 
3166 /// @brief Set array containing the vertex-point associations where the
3167 /// ith element in the array is the point index the ith vertex
3168 /// associates with.
3169 ///
3170 /// @param[in] session
3171 /// The session of Houdini you are interacting with.
3172 /// See @ref HAPI_Sessions for more on sessions.
3173 /// Pass NULL to just use the default in-process session.
3174 ///
3175 /// @param[in] asset_id
3176 /// The asset id.
3177 ///
3178 /// @param[in] object_id
3179 /// The object id.
3180 ///
3181 /// @param[in] geo_id
3182 /// The geometry id.
3183 ///
3184 /// @param[in] vertex_list_array
3185 /// An integer array at least the size of length.
3186 ///
3187 /// @param[in] start
3188 /// First index of range. Must be at least 0 and at
3189 /// most ::HAPI_PartInfo::vertexCount - 1.
3190 ///
3191 /// @param[in] length
3192 /// Must be at least 0 and at most
3193 /// ::HAPI_PartInfo::vertexCount - @p start.
3194 ///
3195 HAPI_DECL HAPI_SetVertexList( const HAPI_Session * session,
3196  HAPI_AssetId asset_id,
3197  HAPI_ObjectId object_id,
3198  HAPI_GeoId geo_id,
3199  const int * vertex_list_array,
3200  int start, int length );
3201 
3202 /// @brief Add an attribute.
3203 ///
3204 /// @param[in] session
3205 /// The session of Houdini you are interacting with.
3206 /// See @ref HAPI_Sessions for more on sessions.
3207 /// Pass NULL to just use the default in-process session.
3208 ///
3209 /// @param[in] asset_id
3210 /// The asset id.
3211 ///
3212 /// @param[in] object_id
3213 /// The object id.
3214 ///
3215 /// @param[in] geo_id
3216 /// The geometry id.
3217 ///
3218 /// @param[in] name
3219 /// Attribute name.
3220 ///
3221 /// @param[in] attr_info
3222 /// ::HAPI_AttributeInfo stores attribute properties.
3223 ///
3224 HAPI_DECL HAPI_AddAttribute( const HAPI_Session * session,
3225  HAPI_AssetId asset_id,
3226  HAPI_ObjectId object_id,
3227  HAPI_GeoId geo_id,
3228  const char * name,
3229  const HAPI_AttributeInfo * attr_info );
3230 
3231 /// @brief Set attribute integer data.
3232 ///
3233 /// @param[in] session
3234 /// The session of Houdini you are interacting with.
3235 /// See @ref HAPI_Sessions for more on sessions.
3236 /// Pass NULL to just use the default in-process session.
3237 ///
3238 /// @param[in] asset_id
3239 /// The asset id.
3240 ///
3241 /// @param[in] object_id
3242 /// The object id.
3243 ///
3244 /// @param[in] geo_id
3245 /// The geometry id.
3246 ///
3247 /// @param[in] name
3248 /// Attribute name.
3249 ///
3250 /// @param[in] attr_info
3251 /// ::HAPI_AttributeInfo used as input for what tuple size.
3252 /// you want. Also contains some sanity checks like
3253 /// data type. Generally should be the same struct
3254 /// returned by ::HAPI_GetAttributeInfo().
3255 ///
3256 /// @param[in] data_array
3257 /// An integer array at least the size of length.
3258 ///
3259 /// @param[in] start
3260 /// First index of range. Must be at least 0 and at
3261 /// most ::HAPI_AttributeInfo::count - 1.
3262 ///
3263 /// @param[in] length
3264 /// Must be at least 0 and at most
3265 /// ::HAPI_AttributeInfo::count - @p start.
3266 ///
3268  HAPI_AssetId asset_id,
3269  HAPI_ObjectId object_id,
3270  HAPI_GeoId geo_id,
3271  const char * name,
3272  const HAPI_AttributeInfo * attr_info,
3273  const int * data_array,
3274  int start, int length );
3275 
3276 /// @brief Set 64-bit attribute integer data.
3277 ///
3278 /// @param[in] session
3279 /// The session of Houdini you are interacting with.
3280 /// See @ref HAPI_Sessions for more on sessions.
3281 /// Pass NULL to just use the default in-process session.
3282 ///
3283 /// @param[in] asset_id
3284 /// The asset id.
3285 ///
3286 /// @param[in] object_id
3287 /// The object id.
3288 ///
3289 /// @param[in] geo_id
3290 /// The geometry id.
3291 ///
3292 /// @param[in] name
3293 /// Attribute name.
3294 ///
3295 /// @param[in] attr_info
3296 /// ::HAPI_AttributeInfo used as input for what tuple size.
3297 /// you want. Also contains some sanity checks like
3298 /// data type. Generally should be the same struct
3299 /// returned by ::HAPI_GetAttributeInfo().
3300 ///
3301 /// @param[in] data_array
3302 /// An 64-bit integer array at least the size of length.
3303 ///
3304 /// @param[in] start
3305 /// First index of range. Must be at least 0 and at
3306 /// most ::HAPI_AttributeInfo::count - 1.
3307 ///
3308 /// @param[in] length
3309 /// Must be at least 0 and at most
3310 /// ::HAPI_AttributeInfo::count - @p start.
3311 ///
3313  HAPI_AssetId asset_id,
3314  HAPI_ObjectId object_id,
3315  HAPI_GeoId geo_id,
3316  const char * name,
3317  const HAPI_AttributeInfo * attr_info,
3318  const HAPI_Int64 * data_array,
3319  int start, int length );
3320 
3321 /// @brief Set attribute float data.
3322 ///
3323 /// @param[in] session
3324 /// The session of Houdini you are interacting with.
3325 /// See @ref HAPI_Sessions for more on sessions.
3326 /// Pass NULL to just use the default in-process session.
3327 ///
3328 /// @param[in] asset_id
3329 /// The asset id.
3330 ///
3331 /// @param[in] object_id
3332 /// The object id.
3333 ///
3334 /// @param[in] geo_id
3335 /// The geometry id.
3336 ///
3337 /// @param[in] name
3338 /// Attribute name.
3339 ///
3340 /// @param[in] attr_info
3341 /// ::HAPI_AttributeInfo used as input for what tuple size.
3342 /// you want. Also contains some sanity checks like
3343 /// data type. Generally should be the same struct
3344 /// returned by ::HAPI_GetAttributeInfo().
3345 ///
3346 /// @param[in] data_array
3347 /// An float array at least the size of length.
3348 ///
3349 /// @param[in] start
3350 /// First index of range. Must be at least 0 and at
3351 /// most ::HAPI_AttributeInfo::count - 1.
3352 ///
3353 /// @param[in] length
3354 /// Must be at least 0 and at most
3355 /// ::HAPI_AttributeInfo::count - @p start.
3356 ///
3358  HAPI_AssetId asset_id,
3359  HAPI_ObjectId object_id,
3360  HAPI_GeoId geo_id,
3361  const char * name,
3362  const HAPI_AttributeInfo * attr_info,
3363  const float * data_array,
3364  int start, int length );
3365 
3366 /// @brief Set 64-bit attribute float data.
3367 ///
3368 /// @param[in] session
3369 /// The session of Houdini you are interacting with.
3370 /// See @ref HAPI_Sessions for more on sessions.
3371 /// Pass NULL to just use the default in-process session.
3372 ///
3373 /// @param[in] asset_id
3374 /// The asset id.
3375 ///
3376 /// @param[in] object_id
3377 /// The object id.
3378 ///
3379 /// @param[in] geo_id
3380 /// The geometry id.
3381 ///
3382 /// @param[in] name
3383 /// Attribute name.
3384 ///
3385 /// @param[in] attr_info
3386 /// ::HAPI_AttributeInfo used as input for what tuple size.
3387 /// you want. Also contains some sanity checks like
3388 /// data type. Generally should be the same struct
3389 /// returned by ::HAPI_GetAttributeInfo().
3390 ///
3391 /// @param[in] data_array
3392 /// An 64-bit float array at least the size of length.
3393 ///
3394 /// @param[in] start
3395 /// First index of range. Must be at least 0 and at
3396 /// most ::HAPI_AttributeInfo::count - 1.
3397 ///
3398 /// @param[in] length
3399 /// Must be at least 0 and at most
3400 /// ::HAPI_AttributeInfo::count - @p start.
3401 ///
3403  HAPI_AssetId asset_id,
3404  HAPI_ObjectId object_id,
3405  HAPI_GeoId geo_id,
3406  const char * name,
3407  const HAPI_AttributeInfo * attr_info,
3408  const double * data_array,
3409  int start, int length );
3410 
3411 /// @brief Set attribute string data.
3412 ///
3413 /// @param[in] session
3414 /// The session of Houdini you are interacting with.
3415 /// See @ref HAPI_Sessions for more on sessions.
3416 /// Pass NULL to just use the default in-process session.
3417 ///
3418 /// @param[in] asset_id
3419 /// The asset id.
3420 ///
3421 /// @param[in] object_id
3422 /// The object id.
3423 ///
3424 /// @param[in] geo_id
3425 /// The geometry id.
3426 ///
3427 /// @param[in] name
3428 /// Attribute name.
3429 ///
3430 /// @param[in] attr_info
3431 /// ::HAPI_AttributeInfo used as input for what tuple size.
3432 /// you want. Also contains some sanity checks like
3433 /// data type. Generally should be the same struct
3434 /// returned by ::HAPI_GetAttributeInfo().
3435 ///
3436 /// @param[in] data_array
3437 /// A strings array at least the size of length.
3438 ///
3439 /// @param[in] start
3440 /// First index of range. Must be at least 0 and at
3441 /// most ::HAPI_AttributeInfo::count - 1.
3442 ///
3443 /// @param[in] length
3444 /// Must be at least 0 and at most
3445 /// ::HAPI_AttributeInfo::count - @p start.
3446 ///
3448  HAPI_AssetId asset_id,
3449  HAPI_ObjectId object_id,
3450  HAPI_GeoId geo_id,
3451  const char * name,
3452  const HAPI_AttributeInfo *attr_info,
3453  const char ** data_array,
3454  int start, int length );
3455 
3456 /// @brief Add a group to the input geo with the given type and name.
3457 ///
3458 /// @param[in] session
3459 /// The session of Houdini you are interacting with.
3460 /// See @ref HAPI_Sessions for more on sessions.
3461 /// Pass NULL to just use the default in-process session.
3462 ///
3463 /// @param[in] asset_id
3464 /// The asset id.
3465 ///
3466 /// @param[in] object_id
3467 /// The object id.
3468 ///
3469 /// @param[in] geo_id
3470 /// The geometry id.
3471 ///
3472 /// @param[in] group_type
3473 /// The group type.
3474 ///
3475 /// @param[in] group_name
3476 /// Name of new group to be added.
3477 ///
3478 HAPI_DECL HAPI_AddGroup( const HAPI_Session * session,
3479  HAPI_AssetId asset_id,
3480  HAPI_ObjectId object_id,
3481  HAPI_GeoId geo_id,
3482  HAPI_GroupType group_type,
3483  const char * group_name );
3484 
3485 /// @brief Set group membership.
3486 ///
3487 /// @param[in] session
3488 /// The session of Houdini you are interacting with.
3489 /// See @ref HAPI_Sessions for more on sessions.
3490 /// Pass NULL to just use the default in-process session.
3491 ///
3492 /// @param[in] asset_id
3493 /// The asset id.
3494 ///
3495 /// @param[in] object_id
3496 /// The object id.
3497 ///
3498 /// @param[in] geo_id
3499 /// The geometry id.
3500 ///
3501 /// @param[in] group_type
3502 /// The group type.
3503 ///
3504 /// @param[in] group_name
3505 /// The group name.
3506 ///
3507 /// @param[in] membership_array
3508 /// Array of ints that represent the membership of this
3509 /// group. Should be the size given by
3510 /// ::HAPI_PartInfo_GetElementCountByGroupType() with
3511 /// @p group_type and the ::HAPI_PartInfo of @p part_id.
3512 ///
3513 /// @param[in] start
3514 /// Start offset into the membership array. Must be
3515 /// less than ::HAPI_PartInfo_GetElementCountByGroupType().
3516 ///
3517 /// @param[in] length
3518 /// Should be less than or equal to the size
3519 /// of @p membership.
3520 ///
3522  HAPI_AssetId asset_id,
3523  HAPI_ObjectId object_id,
3524  HAPI_GeoId geo_id,
3525  HAPI_GroupType group_type,
3526  const char * group_name,
3527  const int * membership_array,
3528  int start, int length );
3529 
3530 /// @brief Commit the current input geometry to the cook engine. Nodes
3531 /// that use this geometry node will re-cook using the input
3532 /// geometry given through the geometry setter API calls.
3533 ///
3534 /// @param[in] session
3535 /// The session of Houdini you are interacting with.
3536 /// See @ref HAPI_Sessions for more on sessions.
3537 /// Pass NULL to just use the default in-process session.
3538 ///
3539 /// @param[in] asset_id
3540 /// The asset id.
3541 ///
3542 /// @param[in] object_id
3543 /// The object id.
3544 ///
3545 /// @param[in] geo_id
3546 /// The geometry id.
3547 ///
3548 HAPI_DECL HAPI_CommitGeo( const HAPI_Session * session,
3549  HAPI_AssetId asset_id,
3550  HAPI_ObjectId object_id,
3551  HAPI_GeoId geo_id );
3552 
3553 /// @brief Remove all changes that have been committed to this
3554 /// geometry. If this is an intermediate result node (Edit SOP), all
3555 /// deltas will be removed. If it's any other type of node, the node
3556 /// will be unlocked if it is locked.
3557 ///
3558 /// @param[in] session
3559 /// The session of Houdini you are interacting with.
3560 /// See @ref HAPI_Sessions for more on sessions.
3561 /// Pass NULL to just use the default in-process session.
3562 ///
3563 /// @param[in] asset_id
3564 /// The asset id.
3565 ///
3566 /// @param[in] object_id
3567 /// The object id.
3568 ///
3569 /// @param[in] geo_id
3570 /// The geometry id.
3571 ///
3572 HAPI_DECL HAPI_RevertGeo( const HAPI_Session * session,
3573  HAPI_AssetId asset_id,
3574  HAPI_ObjectId object_id,
3575  HAPI_GeoId geo_id );
3576 
3577 // INTER-ASSET --------------------------------------------------------------
3578 
3579 /// @brief Connect the transform of two assets together.
3580 ///
3581 /// @param[in] session
3582 /// The session of Houdini you are interacting with.
3583 /// See @ref HAPI_Sessions for more on sessions.
3584 /// Pass NULL to just use the default in-process session.
3585 ///
3586 /// @param[in] asset_id_from
3587 /// The asset id of the source asset.
3588 ///
3589 /// @param[in] asset_id_to
3590 /// The asset id of the destination asset.
3591 ///
3592 /// @param[in] input_idx
3593 /// The index on the destination asset where the
3594 /// connection should be made.
3595 ///
3597  HAPI_AssetId asset_id_from,
3598  HAPI_AssetId asset_id_to,
3599  int input_idx );
3600 
3601 /// @brief Break an existing transform connection
3602 ///
3603 /// @param[in] session
3604 /// The session of Houdini you are interacting with.
3605 /// See @ref HAPI_Sessions for more on sessions.
3606 /// Pass NULL to just use the default in-process session.
3607 ///
3608 /// @param[in] asset_id
3609 /// The asset id of the asset.
3610 ///
3611 /// @param[in] input_idx
3612 /// The index on the asset where the connection
3613 /// should be broken.
3614 ///
3616  HAPI_AssetId asset_id,
3617  int input_idx );
3618 
3619 /// @brief Connect the geometry of two assets together. For
3620 /// example we can connect a particular piece of geometry from
3621 /// an object level asset to a sop level asset or even another
3622 /// object level asset. This method gives you the fine grained
3623 /// control over the exact piece of geometry to connect by
3624 /// allowing you to specify the exact object and group of the
3625 /// geometry you are trying to connect.
3626 ///
3627 /// @param[in] session
3628 /// The session of Houdini you are interacting with.
3629 /// See @ref HAPI_Sessions for more on sessions.
3630 /// Pass NULL to just use the default in-process session.
3631 ///
3632 /// @param[in] asset_id_from
3633 /// The asset id of the source asset.
3634 ///
3635 /// @param[in] object_id_from
3636 /// The object within the asset that contains the
3637 /// geometry to send.
3638 ///
3639 /// @param[in] asset_id_to
3640 /// The asset id of the destination asset.
3641 ///
3642 /// @param[in] input_idx
3643 /// The index on the destination asset where the
3644 /// connection should be made.
3645 ///
3647  HAPI_AssetId asset_id_from,
3648  HAPI_ObjectId object_id_from,
3649  HAPI_AssetId asset_id_to,
3650  int input_idx );
3651 
3652 /// @brief Break an existing geometry connection
3653 ///
3654 /// @param[in] session
3655 /// The session of Houdini you are interacting with.
3656 /// See @ref HAPI_Sessions for more on sessions.
3657 /// Pass NULL to just use the default in-process session.
3658 ///
3659 /// @param[in] asset_id
3660 /// The asset id of the asset.
3661 ///
3662 /// @param[in] input_idx
3663 /// The index on the asset where the connection
3664 /// should be broken.
3665 ///
3667  HAPI_AssetId asset_id,
3668  int input_idx );
3669 
3670 // MATERIALS ----------------------------------------------------------------
3671 
3672 /// @brief Get material ids by face/primitive. The material ids returned
3673 /// will be valid as long as the asset is alive. You should query
3674 /// this list after every cook to see if the material assignments
3675 /// have changed. You should also query each material individually
3676 /// using ::HAPI_GetMaterialInfo() to see if it is dirty and needs
3677 /// to be re-imported.
3678 ///
3679 /// @param[in] session
3680 /// The session of Houdini you are interacting with.
3681 /// See @ref HAPI_Sessions for more on sessions.
3682 /// Pass NULL to just use the default in-process session.
3683 ///
3684 /// @param[in] asset_id
3685 /// The asset id.
3686 ///
3687 /// @param[in] object_id
3688 /// The object id.
3689 ///
3690 /// @param[in] geo_id
3691 /// The geometry id.
3692 ///
3693 /// @param[in] part_id
3694 /// The part id.
3695 ///
3696 /// @param[out] are_all_the_same
3697 /// (optional) If true, all faces on this part have the
3698 /// same material assignment. You can pass NULL here.
3699 ///
3700 /// @param[out] material_ids_array
3701 /// An array of ::HAPI_MaterialId at least the size of
3702 /// @p length and at most the size of
3703 /// ::HAPI_PartInfo::faceCount.
3704 ///
3705 /// @param[in] start
3706 /// The starting index into the list of faces from which
3707 /// you wish to get the material ids from. Note that
3708 /// this should be less than ::HAPI_PartInfo::faceCount.
3709 ///
3710 /// @param[in] length
3711 /// The number of material ids you wish to get. Note that
3712 /// this should be at most:
3713 /// ::HAPI_PartInfo::faceCount - @p start.
3714 ///
3716  HAPI_AssetId asset_id,
3717  HAPI_ObjectId object_id,
3718  HAPI_GeoId geo_id,
3719  HAPI_PartId part_id,
3720  HAPI_Bool * are_all_the_same,
3721  HAPI_MaterialId * material_ids_array,
3722  int start, int length );
3723 
3724 /// @brief Get the material info.
3725 ///
3726 /// @param[in] session
3727 /// The session of Houdini you are interacting with.
3728 /// See @ref HAPI_Sessions for more on sessions.
3729 /// Pass NULL to just use the default in-process session.
3730 ///
3731 /// @param[in] asset_id
3732 /// The asset id.
3733 ///
3734 /// @param[in] material_id
3735 /// The material id as given from
3736 /// ::HAPI_GetMaterialIdsOnFaces().
3737 ///
3738 /// @param[out] material_info
3739 /// The returned material info.
3740 ///
3742  HAPI_AssetId asset_id,
3743  HAPI_MaterialId material_id,
3744  HAPI_MaterialInfo * material_info );
3745 
3746 /// @brief Get the material on a part.
3747 ///
3748 /// @param[in] session
3749 /// The session of Houdini you are interacting with.
3750 /// See @ref HAPI_Sessions for more on sessions.
3751 /// Pass NULL to just use the default in-process session.
3752 ///
3753 /// @param[in] asset_id
3754 /// The asset id.
3755 ///
3756 /// @param[in] object_id
3757 /// The object id.
3758 ///
3759 /// @param[in] geo_id
3760 /// The geometry id.
3761 ///
3762 /// @param[in] part_id
3763 /// The part id.
3764 ///
3765 /// @param[out] material_info
3766 /// The returned ::HAPI_MaterialInfo. If there is no
3767 /// material on this part the call will still succeed
3768 /// but the ::HAPI_MaterialInfo::exists will be set to
3769 /// false.
3770 ///
3772 HAPI_GetMaterialOnPart( const HAPI_Session * session,
3773  HAPI_AssetId asset_id,
3774  HAPI_ObjectId object_id,
3775  HAPI_GeoId geo_id,
3776  HAPI_PartId part_id,
3777  HAPI_MaterialInfo * material_info );
3778 
3779 /// @brief Get the material on a group. Use the
3780 /// ::HAPI_GetGroupMembership() call to determine where the
3781 /// material should be applied.
3782 ///
3783 /// @param[in] session
3784 /// The session of Houdini you are interacting with.
3785 /// See @ref HAPI_Sessions for more on sessions.
3786 /// Pass NULL to just use the default in-process session.
3787 ///
3788 /// @param[in] asset_id
3789 /// The asset id.
3790 ///
3791 /// @param[in] object_id
3792 /// The object id.
3793 ///
3794 /// @param[in] geo_id
3795 /// The geometry id.
3796 ///
3797 /// @param[in] group_name
3798 /// The group name.
3799 ///
3800 /// @param[out] material_info
3801 /// The returned ::HAPI_MaterialInfo. If there is no
3802 /// material on this group the call will still succeed
3803 /// but the ::HAPI_MaterialInfo::exists will be set to
3804 /// false.
3805 ///
3807 HAPI_GetMaterialOnGroup( const HAPI_Session * session,
3808  HAPI_AssetId asset_id,
3809  HAPI_ObjectId object_id,
3810  HAPI_GeoId geo_id,
3811  const char * group_name,
3812  HAPI_MaterialInfo * material_info );
3813 
3814 /// @brief Render only a single texture to an image for later extraction.
3815 /// An example use of this method might be to render the diffuse,
3816 /// normal, and bump texture maps of a material to individual
3817 /// texture files for use within the client application.
3818 ///
3819 /// Note that you must call this first for any of the other material
3820 /// APIs to work.
3821 ///
3822 /// @param[in] session
3823 /// The session of Houdini you are interacting with.
3824 /// See @ref HAPI_Sessions for more on sessions.
3825 /// Pass NULL to just use the default in-process session.
3826 ///
3827 /// @param[in] asset_id
3828 /// The asset id.
3829 ///
3830 /// @param[in] material_id
3831 /// The material id as given in ::HAPI_MaterialInfo.
3832 ///
3833 /// @param[in] parm_id
3834 /// This is the index in the parameter list of the
3835 /// material_id's node of the parameter containing the
3836 /// texture map file path.
3837 ///
3839  HAPI_AssetId asset_id,
3840  HAPI_MaterialId material_id,
3841  HAPI_ParmId parm_id );
3842 
3843 /// @brief Get the number of supported texture file formats.
3844 ///
3845 /// @param[in] session
3846 /// The session of Houdini you are interacting with.
3847 /// See @ref HAPI_Sessions for more on sessions.
3848 /// Pass NULL to just use the default in-process session.
3849 ///
3850 /// @param[out] file_format_count
3851 /// The number of supported texture file formats.
3852 ///
3854  int * file_format_count );
3855 
3856 /// @brief Get a list of support image file formats - their names,
3857 /// descriptions and a list of recognized extensions.
3858 ///
3859 /// Note that you MUST call
3860 /// ::HAPI_GetSupportedImageFileFormatCount()
3861 /// before calling this function for the first time.
3862 ///
3863 /// @param[in] session
3864 /// The session of Houdini you are interacting with.
3865 /// See @ref HAPI_Sessions for more on sessions.
3866 /// Pass NULL to just use the default in-process session.
3867 ///
3868 /// @param[out] formats_array
3869 /// The list of ::HAPI_ImageFileFormat structs to
3870 /// be filled.
3871 ///
3872 /// @param[in] file_format_count
3873 /// The number of supported texture file formats. This
3874 /// should be at least as large as the count returned
3875 /// by ::HAPI_GetSupportedImageFileFormatCount().
3876 ///
3878  const HAPI_Session * session,
3879  HAPI_ImageFileFormat * formats_array,
3880  int file_format_count );
3881 
3882 /// @brief Get information about the image that was just rendered, like
3883 /// resolution and default file format. This information will be
3884 /// used when extracting planes to an image.
3885 ///
3886 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3887 /// this method call to make sense.
3888 ///
3889 /// @param[in] session
3890 /// The session of Houdini you are interacting with.
3891 /// See @ref HAPI_Sessions for more on sessions.
3892 /// Pass NULL to just use the default in-process session.
3893 ///
3894 /// @param[in] asset_id
3895 /// The asset id.
3896 ///
3897 /// @param[in] material_id
3898 /// The material id as given in ::HAPI_MaterialInfo.
3899 ///
3900 /// @param[out] image_info
3901 /// The struct containing the image information.
3902 ///
3903 HAPI_DECL HAPI_GetImageInfo( const HAPI_Session * session,
3904  HAPI_AssetId asset_id,
3905  HAPI_MaterialId material_id,
3906  HAPI_ImageInfo * image_info );
3907 
3908 /// @brief Set image information like resolution and file format.
3909 /// This information will be used when extracting planes to
3910 /// an image.
3911 ///
3912 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3913 /// this method call to make sense.
3914 ///
3915 /// You should also first call ::HAPI_GetImageInfo() to get the
3916 /// current Image Info and change only the properties
3917 /// you don't like.
3918 ///
3919 /// @param[in] session
3920 /// The session of Houdini you are interacting with.
3921 /// See @ref HAPI_Sessions for more on sessions.
3922 /// Pass NULL to just use the default in-process session.
3923 ///
3924 /// @param[in] asset_id
3925 /// The asset id.
3926 ///
3927 /// @param[in] material_id
3928 /// The material id as given in ::HAPI_MaterialInfo.
3929 ///
3930 /// @param[in] image_info
3931 /// The struct containing the new image information.
3932 ///
3933 HAPI_DECL HAPI_SetImageInfo( const HAPI_Session * session,
3934  HAPI_AssetId asset_id,
3935  HAPI_MaterialId material_id,
3936  const HAPI_ImageInfo * image_info );
3937 
3938 /// @brief Get the number of image planes for the just rendered image.
3939 ///
3940 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3941 /// this method call to make sense.
3942 ///
3943 /// @param[in] session
3944 /// The session of Houdini you are interacting with.
3945 /// See @ref HAPI_Sessions for more on sessions.
3946 /// Pass NULL to just use the default in-process session.
3947 ///
3948 /// @param[in] asset_id
3949 /// The asset id.
3950 ///
3951 /// @param[in] material_id
3952 /// The material id as given in ::HAPI_MaterialInfo.
3953 ///
3954 /// @param[out] image_plane_count
3955 /// The number of image planes.
3956 ///
3958  HAPI_AssetId asset_id,
3959  HAPI_MaterialId material_id,
3960  int * image_plane_count );
3961 
3962 /// @brief Get the names of the image planes of the just rendered image.
3963 ///
3964 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3965 /// this method call to make sense.
3966 ///
3967 /// You should also call ::HAPI_GetImagePlaneCount() first to get
3968 /// the total number of image planes so you know how large the
3969 /// image_planes string handle array should be.
3970 ///
3971 /// @param[in] session
3972 /// The session of Houdini you are interacting with.
3973 /// See @ref HAPI_Sessions for more on sessions.
3974 /// Pass NULL to just use the default in-process session.
3975 ///
3976 /// @param[in] asset_id
3977 /// The asset id.
3978 ///
3979 /// @param[in] material_id
3980 /// The material id as given in ::HAPI_MaterialInfo.
3981 ///
3982 /// @param[out] image_planes_array
3983 /// The image plane names.
3984 ///
3985 /// @param[in] image_plane_count
3986 /// The number of image planes to get names for. This
3987 /// must be less than or equal to the count returned
3988 /// by ::HAPI_GetImagePlaneCount().
3989 ///
3990 HAPI_DECL HAPI_GetImagePlanes( const HAPI_Session * session,
3991  HAPI_AssetId asset_id,
3992  HAPI_MaterialId material_id,
3993  HAPI_StringHandle * image_planes_array,
3994  int image_plane_count );
3995 
3996 /// @brief Extract a rendered image to a file.
3997 ///
3998 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3999 /// this method call to make sense.
4000 ///
4001 /// @param[in] session
4002 /// The session of Houdini you are interacting with.
4003 /// See @ref HAPI_Sessions for more on sessions.
4004 /// Pass NULL to just use the default in-process session.
4005 ///
4006 /// @param[in] asset_id
4007 /// The asset id.
4008 ///
4009 /// @param[in] material_id
4010 /// The material id as given in ::HAPI_MaterialInfo.
4011 ///
4012 /// @param[in] image_file_format_name
4013 /// The image file format name you wish the image to be
4014 /// extracted as. You can leave this parameter NULL to
4015 /// get the image in the original format if it comes from
4016 /// another texture file or in the default HAPI format,
4017 /// which is ::HAPI_DEFAULT_IMAGE_FORMAT_NAME, if the image
4018 /// is generated.
4019 ///
4020 /// You can get some of the very common standard image
4021 /// file format names from HAPI_Common.h under the
4022 /// "Defines" section.
4023 ///
4024 /// You can also get a list of all supported file formats
4025 /// (and the exact names this parameter expects)
4026 /// by using ::HAPI_GetSupportedImageFileFormats(). This
4027 /// list will include custom file formats you created via
4028 /// custom DSOs (see HDK docs about IMG_Format). You will
4029 /// get back a list of ::HAPI_ImageFileFormat. This
4030 /// parameter expects the ::HAPI_ImageFileFormat::nameSH
4031 /// of a given image file format.
4032 ///
4033 /// @param[in] image_planes
4034 /// The image planes you wish to extract into the file.
4035 /// Multiple image planes should be separated by spaces.
4036 ///
4037 /// @param[in] destination_folder_path
4038 /// The folder where the image file should be created.
4039 ///
4040 /// @param[in] destination_file_name
4041 /// Optional parameter to overwrite the name of the
4042 /// extracted texture file. This should NOT include
4043 /// the extension as the file type will be decided
4044 /// by the ::HAPI_ImageInfo you can set using
4045 /// ::HAPI_SetImageInfo(). You still have to use
4046 /// destination_file_path to get the final file path.
4047 ///
4048 /// Pass in NULL to have the file name be automatically
4049 /// generated from the name of the material SHOP node,
4050 /// the name of the texture map parameter if the
4051 /// image was rendered from a texture, and the image
4052 /// plane names specified.
4053 ///
4054 /// @param[out] destination_file_path
4055 /// The full path string handle, including the
4056 /// destination_folder_path and the texture file name,
4057 /// to the extracted file. Note that this string handle
4058 /// will only be valid until the next call to
4059 /// this function.
4060 ///
4062  HAPI_AssetId asset_id,
4063  HAPI_MaterialId material_id,
4064  const char * image_file_format_name,
4065  const char * image_planes,
4066  const char * destination_folder_path,
4067  const char * destination_file_name,
4068  int * destination_file_path );
4069 
4070 /// @brief Extract a rendered image to memory.
4071 ///
4072 /// Note that you must call ::HAPI_RenderTextureToImage() first for
4073 /// this method call to make sense.
4074 ///
4075 /// Also note that this function will do all the work of
4076 /// extracting and composoting the image into a memory buffer
4077 /// but will not return to you that buffer, only its size. Use
4078 /// the returned size to allocated a sufficiently large buffer
4079 /// and call ::HAPI_GetImageMemoryBuffer() to fill your buffer
4080 /// with the just extracted image.
4081 ///
4082 /// @param[in] session
4083 /// The session of Houdini you are interacting with.
4084 /// See @ref HAPI_Sessions for more on sessions.
4085 /// Pass NULL to just use the default in-process session.
4086 ///
4087 /// @param[in] asset_id
4088 /// The asset id.
4089 ///
4090 /// @param[in] material_id
4091 /// The material id as given in ::HAPI_MaterialInfo.
4092 ///
4093 /// @param[in] image_file_format_name
4094 /// The image file format name you wish the image to be
4095 /// extracted as. You can leave this parameter NULL to
4096 /// get the image in the original format if it comes from
4097 /// another texture file or in the default HAPI format,
4098 /// which is ::HAPI_DEFAULT_IMAGE_FORMAT_NAME, if the image
4099 /// is generated.
4100 ///
4101 /// You can get some of the very common standard image
4102 /// file format names from HAPI_Common.h under the
4103 /// "Defines" section.
4104 ///
4105 /// You can also get a list of all supported file formats
4106 /// (and the exact names this parameter expects)
4107 /// by using ::HAPI_GetSupportedImageFileFormats(). This
4108 /// list will include custom file formats you created via
4109 /// custom DSOs (see HDK docs about IMG_Format). You will
4110 /// get back a list of ::HAPI_ImageFileFormat. This
4111 /// parameter expects the ::HAPI_ImageFileFormat::nameSH
4112 /// of a given image file format.
4113 ///
4114 /// @param[in] image_planes
4115 /// The image planes you wish to extract into the file.
4116 /// Multiple image planes should be separated by spaces.
4117 ///
4118 /// @param[out] buffer_size
4119 /// The extraction will be done to an internal buffer
4120 /// who's size you get via this parameter. Use the
4121 /// returned buffer_size when calling
4122 /// ::HAPI_GetImageMemoryBuffer() to get the image
4123 /// buffer you just extracted.
4124 ///
4126  HAPI_AssetId asset_id,
4127  HAPI_MaterialId material_id,
4128  const char * image_file_format_name,
4129  const char * image_planes,
4130  int * buffer_size );
4131 
4132 /// @brief Fill your allocated buffer with the just extracted
4133 /// image buffer.
4134 ///
4135 /// Note that you must call ::HAPI_RenderTextureToImage() first for
4136 /// this method call to make sense.
4137 ///
4138 /// Also note that you must call ::HAPI_ExtractImageToMemory()
4139 /// first in order to perform the extraction and get the
4140 /// extracted image buffer size that you need to know how much
4141 /// memory to allocated to fit your extracted image.
4142 ///
4143 /// @param[in] session
4144 /// The session of Houdini you are interacting with.
4145 /// See @ref HAPI_Sessions for more on sessions.
4146 /// Pass NULL to just use the default in-process session.
4147 ///
4148 /// @param[in] asset_id
4149 /// The asset id.
4150 ///
4151 /// @param[in] material_id
4152 /// The material id as given in ::HAPI_MaterialInfo.
4153 ///
4154 /// @param[out] buffer
4155 /// The buffer passed in here will be filled with the
4156 /// image buffer created during the call to
4157 /// ::HAPI_ExtractImageToMemory().
4158 ///
4159 /// @param[in] length
4160 /// Sanity check. This size should be the same as the
4161 /// size allocated for the buffer passed in and should
4162 /// be at least as large as the buffer_size returned by
4163 /// the call to ::HAPI_ExtractImageToMemory().
4164 ///
4166  HAPI_AssetId asset_id,
4167  HAPI_MaterialId material_id,
4168  char * buffer, int length );
4169 
4170 // SIMULATION/ANIMATION -----------------------------------------------------
4171 
4172 /// @brief Set an animation curve on a parameter of an exposed node.
4173 ///
4174 /// @param[in] session
4175 /// The session of Houdini you are interacting with.
4176 /// See @ref HAPI_Sessions for more on sessions.
4177 /// Pass NULL to just use the default in-process session.
4178 ///
4179 /// @param[in] node_id
4180 /// The exposed node id.
4181 ///
4182 /// @param[in] parm_id
4183 /// The id of an exposed parameter within the node.
4184 /// @param[in] parm_index
4185 /// The index of the parameter, if it is for example
4186 /// a 3 tuple
4187 ///
4188 /// @param[in] curve_keyframes_array
4189 /// An array of ::HAPI_Keyframe structs that describes
4190 /// the keys on this curve.
4191 ///
4192 /// @param[in] keyframe_count
4193 /// The number of keys on the curve.
4194 ///
4195 HAPI_DECL HAPI_SetAnimCurve( const HAPI_Session * session,
4196  HAPI_NodeId node_id, HAPI_ParmId parm_id,
4197  int parm_index,
4198  const HAPI_Keyframe * curve_keyframes_array,
4199  int keyframe_count );
4200 
4201 /// @brief A specialized convenience function to set the T,R,S values
4202 /// on an exposed node.
4203 ///
4204 /// @param[in] session
4205 /// The session of Houdini you are interacting with.
4206 /// See @ref HAPI_Sessions for more on sessions.
4207 /// Pass NULL to just use the default in-process session.
4208 ///
4209 /// @param[in] node_id
4210 /// The exposed node id.
4211 ///
4212 /// @param[in] trans_comp
4213 /// A value of ::HAPI_TransformComponent that
4214 /// identifies the particular comopnent of the
4215 /// transform to attach the curve to, for example
4216 /// ::HAPI_TRANSFORM_TX.
4217 ///
4218 /// @param[in] curve_keyframes_array
4219 /// An array of ::HAPI_Keyframe structs that describes
4220 /// the keys on this curve.
4221 ///
4222 /// @param[in] keyframe_count
4223 /// The number of keys on the curve.
4224 ///
4226  const HAPI_Session * session,
4227  HAPI_NodeId node_id,
4228  HAPI_TransformComponent trans_comp,
4229  const HAPI_Keyframe * curve_keyframes_array,
4230  int keyframe_count );
4231 
4232 /// @brief Resets the simulation cache of the asset. This is very useful
4233 /// for assets that use dynamics, to be called after some
4234 /// setup has changed for the asset - for example, asset inputs
4235 ///
4236 /// @param[in] session
4237 /// The session of Houdini you are interacting with.
4238 /// See @ref HAPI_Sessions for more on sessions.
4239 /// Pass NULL to just use the default in-process session.
4240 ///
4241 /// @param[in] asset_id
4242 /// The asset id.
4243 ///
4245  HAPI_AssetId asset_id );
4246 
4247 // VOLUMES ------------------------------------------------------------------
4248 
4249 /// @brief Retrieve any meta-data about the volume primitive, including
4250 /// its transform, location, scale, taper, resolution.
4251 ///
4252 /// @param[in] session
4253 /// The session of Houdini you are interacting with.
4254 /// See @ref HAPI_Sessions for more on sessions.
4255 /// Pass NULL to just use the default in-process session.
4256 ///
4257 /// @param[in] asset_id
4258 /// The asset id.
4259 ///
4260 /// @param[in] object_id
4261 /// The object id.
4262 ///
4263 /// @param[in] geo_id
4264 /// The geometry id.
4265 ///
4266 /// @param[in] part_id
4267 /// The part id.
4268 ///
4269 /// @param[out] volume_info
4270 /// The meta-data associated with the volume on the
4271 /// part specified by the previous parameters.
4272 ///
4273 HAPI_DECL HAPI_GetVolumeInfo( const HAPI_Session * session,
4274  HAPI_AssetId asset_id,
4275  HAPI_ObjectId object_id,
4276  HAPI_GeoId geo_id,
4277  HAPI_PartId part_id,
4278  HAPI_VolumeInfo * volume_info );
4279 
4280 /// @brief Iterate through a volume based on 8x8x8 sections of the volume
4281 /// Start iterating through the value of the volume at part_id.
4282 ///
4283 /// @param[in] session
4284 /// The session of Houdini you are interacting with.
4285 /// See @ref HAPI_Sessions for more on sessions.
4286 /// Pass NULL to just use the default in-process session.
4287 ///
4288 /// @param[in] asset_id
4289 /// The asset id.
4290 ///
4291 /// @param[in] object_id
4292 /// The object id.
4293 ///
4294 /// @param[in] geo_id
4295 /// The geometry id.
4296 ///
4297 /// @param[in] part_id
4298 /// The part id.
4299 ///
4300 /// @param[out] tile
4301 /// The tile info referring to the first tile in the
4302 /// volume at part_id.
4303 ///
4305  HAPI_AssetId asset_id,
4306  HAPI_ObjectId object_id,
4307  HAPI_GeoId geo_id,
4308  HAPI_PartId part_id,
4309  HAPI_VolumeTileInfo * tile );
4310 
4311 /// @brief Iterate through a volume based on 8x8x8 sections of the volume
4312 /// Continue iterating through the value of the volume at part_id.
4313 ///
4314 /// @param[in] session
4315 /// The session of Houdini you are interacting with.
4316 /// See @ref HAPI_Sessions for more on sessions.
4317 /// Pass NULL to just use the default in-process session.
4318 ///
4319 /// @param[in] asset_id
4320 /// The asset id.
4321 ///
4322 /// @param[in] object_id
4323 /// The object id.
4324 ///
4325 /// @param[in] geo_id
4326 /// The geometry id.
4327 ///
4328 /// @param[in] part_id
4329 /// The part id.
4330 ///
4331 /// @param[out] tile
4332 /// The tile info referring to the next tile in the
4333 /// set of tiles associated with the volume at this part.
4334 ///
4336  HAPI_AssetId asset_id,
4337  HAPI_ObjectId object_id,
4338  HAPI_GeoId geo_id,
4339  HAPI_PartId part_id,
4340  HAPI_VolumeTileInfo * tile );
4341 
4342 /// @brief Retrieve floating point values of the voxel at a specific
4343 /// index. Note that you must call ::HAPI_GetVolumeInfo() prior
4344 /// to this call.
4345 ///
4346 /// @param[in] session
4347 /// The session of Houdini you are interacting with.
4348 /// See @ref HAPI_Sessions for more on sessions.
4349 /// Pass NULL to just use the default in-process session.
4350 ///
4351 /// @param[in] asset_id
4352 /// The asset id.
4353 ///
4354 /// @param[in] object_id
4355 /// The object id.
4356 ///
4357 /// @param[in] geo_id
4358 /// The geometry id.
4359 ///
4360 /// @param[in] part_id
4361 /// The part id.
4362 ///
4363 /// @param[in] x_index
4364 /// The x index/coordinate of the voxel.
4365 ///
4366 /// @param[in] y_index
4367 /// The y index/coordinate of the voxel.
4368 ///
4369 /// @param[in] z_index
4370 /// The z index/coordinate of the voxel.
4371 ///
4372 /// @param[out] values_array
4373 /// The values of the voxel.
4374 ///
4375 /// @param[in] value_count
4376 /// Should be equal to the volume's
4377 /// ::HAPI_VolumeInfo::tupleSize.
4378 ///
4380  HAPI_AssetId asset_id,
4381  HAPI_ObjectId object_id,
4382  HAPI_GeoId geo_id,
4383  HAPI_PartId part_id,
4384  int x_index,
4385  int y_index,
4386  int z_index,
4387  float * values_array,
4388  int value_count );
4389 
4390 /// @brief Retrieve floating point values of the voxels pointed to
4391 /// by a tile. Note that a tile may extend beyond the limits
4392 /// of the volume so not all values in the given buffer will
4393 /// be written to. Voxels outside the volume will be initialized
4394 /// to the given fill value.
4395 ///
4396 /// @param[in] session
4397 /// The session of Houdini you are interacting with.
4398 /// See @ref HAPI_Sessions for more on sessions.
4399 /// Pass NULL to just use the default in-process session.
4400 ///
4401 /// @param[in] asset_id
4402 /// The asset id.
4403 ///
4404 /// @param[in] object_id
4405 /// The object id.
4406 ///
4407 /// @param[in] geo_id
4408 /// The geometry id.
4409 ///
4410 /// @param[in] part_id
4411 /// The part id.
4412 ///
4413 /// @param[in] fill_value
4414 /// Value that will be used to fill the @p values_array.
4415 /// This is useful so that you can see what values
4416 /// have actually been written to.
4417 ///
4418 /// @param[in] tile
4419 /// The tile to retrieve.
4420 ///
4421 /// @param[out] values_array
4422 /// The values of the tile.
4423 ///
4424 /// @param[in] length
4425 /// The length should be ( 8 ^ 3 ) * tupleSize.
4426 ///
4428  HAPI_AssetId asset_id,
4429  HAPI_ObjectId object_id,
4430  HAPI_GeoId geo_id,
4431  HAPI_PartId part_id,
4432  float fill_value,
4433  const HAPI_VolumeTileInfo * tile,
4434  float * values_array,
4435  int length );
4436 
4437 /// @brief Retrieve integer point values of the voxel at a specific
4438 /// index. Note that you must call ::HAPI_GetVolumeInfo() prior
4439 /// to this call.
4440 ///
4441 /// @param[in] session
4442 /// The session of Houdini you are interacting with.
4443 /// See @ref HAPI_Sessions for more on sessions.
4444 /// Pass NULL to just use the default in-process session.
4445 ///
4446 /// @param[in] asset_id
4447 /// The asset id.
4448 ///
4449 /// @param[in] object_id
4450 /// The object id.
4451 ///
4452 /// @param[in] geo_id
4453 /// The geometry id.
4454 ///
4455 /// @param[in] part_id
4456 /// The part id.
4457 ///
4458 /// @param[in] x_index
4459 /// The x index/coordinate of the voxel.
4460 ///
4461 /// @param[in] y_index
4462 /// The y index/coordinate of the voxel.
4463 ///
4464 /// @param[in] z_index
4465 /// The z index/coordinate of the voxel.
4466 ///
4467 /// @param[out] values_array
4468 /// The values of the voxel.
4469 ///
4470 /// @param[in] value_count
4471 /// Should be equal to the volume's
4472 /// ::HAPI_VolumeInfo::tupleSize.
4473 ///
4475  HAPI_AssetId asset_id,
4476  HAPI_ObjectId object_id,
4477  HAPI_GeoId geo_id,
4478  HAPI_PartId part_id,
4479  int x_index,
4480  int y_index,
4481  int z_index,
4482  int * values_array,
4483  int value_count );
4484 
4485 /// @brief Retrieve integer point values of the voxels pointed to
4486 /// by a tile. Note that a tile may extend beyond the limits
4487 /// of the volume so not all values in the given buffer will
4488 /// be written to. Voxels outside the volume will be initialized
4489 /// to the given fill value.
4490 ///
4491 /// @param[in] session
4492 /// The session of Houdini you are interacting with.
4493 /// See @ref HAPI_Sessions for more on sessions.
4494 /// Pass NULL to just use the default in-process session.
4495 ///
4496 /// @param[in] asset_id
4497 /// The asset id.
4498 ///
4499 /// @param[in] object_id
4500 /// The object id.
4501 ///
4502 /// @param[in] geo_id
4503 /// The geometry id.
4504 ///
4505 /// @param[in] part_id
4506 /// The part id.
4507 ///
4508 /// @param[in] fill_value
4509 /// Value that will be used to fill the @p values_array.
4510 /// This is useful so that you can see what values
4511 /// have actually been written to.
4512 ///
4513 /// @param[in] tile
4514 /// The tile to retrieve.
4515 ///
4516 /// @param[out] values_array
4517 /// The values of the tile.
4518 ///
4519 /// @param[in] length
4520 /// The length should be ( 8 ^ 3 ) * tupleSize.
4521 ///
4523  HAPI_AssetId asset_id,
4524  HAPI_ObjectId object_id,
4525  HAPI_GeoId geo_id,
4526  HAPI_PartId part_id,
4527  int fill_value,
4528  const HAPI_VolumeTileInfo * tile,
4529  int * values_array,
4530  int length );
4531 
4532 /// @brief Set the volume info of a geo on a geo input.
4533 ///
4534 /// @param[in] session
4535 /// The session of Houdini you are interacting with.
4536 /// See @ref HAPI_Sessions for more on sessions.
4537 /// Pass NULL to just use the default in-process session.
4538 ///
4539 /// @param[in] asset_id
4540 /// An asset that this volume will be input into.
4541 ///
4542 /// @param[in] object_id
4543 /// The object id.
4544 ///
4545 /// @param[in] geo_id
4546 /// The geometry id.
4547 ///
4548 /// @param[in] volume_info
4549 /// All volume information that can be specified per
4550 /// volume. This includes the position, orientation, scale,
4551 /// data format, tuple size, and taper. The tile size is
4552 /// always 8x8x8.
4553 ///
4554 HAPI_DECL HAPI_SetVolumeInfo( const HAPI_Session * session,
4555  HAPI_AssetId asset_id,
4556  HAPI_ObjectId object_id,
4557  HAPI_GeoId geo_id,
4558  const HAPI_VolumeInfo * volume_info );
4559 
4560 /// @brief Set the values of a float tile: this is an 8x8x8 subsection of
4561 /// the volume.
4562 ///
4563 /// @param[in] session
4564 /// The session of Houdini you are interacting with.
4565 /// See @ref HAPI_Sessions for more on sessions.
4566 /// Pass NULL to just use the default in-process session.
4567 ///
4568 /// @param[in] asset_id
4569 /// The asset that the volume will be input into.
4570 ///
4571 /// @param[in] object_id
4572 /// The object id.
4573 ///
4574 /// @param[in] geo_id
4575 /// The geometry id.
4576 ///
4577 /// @param[in] tile
4578 /// The tile that the volume will be input into.
4579 ///
4580 /// @param[in] values_array
4581 /// The values of the individual voxel tiles in the
4582 /// volume. The length of this array should
4583 /// be ( 8 ^ 3 ) * tupleSize.
4584 ///
4585 /// @param[in] length
4586 /// The length should be ( 8 ^ 3 ) * tupleSize.
4587 ///
4589  HAPI_AssetId asset_id,
4590  HAPI_ObjectId object_id,
4591  HAPI_GeoId geo_id,
4592  const HAPI_VolumeTileInfo * tile,
4593  const float * values_array,
4594  int length );
4595 
4596 /// @brief Set the values of an int tile: this is an 8x8x8 subsection of
4597 /// the volume.
4598 ///
4599 /// @param[in] session
4600 /// The session of Houdini you are interacting with.
4601 /// See @ref HAPI_Sessions for more on sessions.
4602 /// Pass NULL to just use the default in-process session.
4603 ///
4604 /// @param[in] asset_id
4605 /// The asset that the volume will be input into.
4606 ///
4607 /// @param[in] object_id
4608 /// The object id.
4609 ///
4610 /// @param[in] geo_id
4611 /// The geometry id.
4612 ///
4613 /// @param[in] tile
4614 /// The tile that the volume will be input into.
4615 ///
4616 /// @param[in] values_array
4617 /// The values of the individual voxel tiles in the
4618 /// volume. The length of this array should
4619 /// be ( 8 ^ 3 ) * tupleSize.
4620 ///
4621 /// @param[in] length
4622 /// The length should be ( 8 ^ 3 ) * tupleSize.
4623 ///
4625  HAPI_AssetId asset_id,
4626  HAPI_ObjectId object_id,
4627  HAPI_GeoId geo_id,
4628  const HAPI_VolumeTileInfo * tile,
4629  const int * values_array,
4630  int length );
4631 
4632 // CURVES -------------------------------------------------------------------
4633 
4634 /// @brief Retrieve any meta-data about the curves, including the
4635 /// curve's type, order, and periodicity.
4636 ///
4637 /// @param[in] session
4638 /// The session of Houdini you are interacting with.
4639 /// See @ref HAPI_Sessions for more on sessions.
4640 /// Pass NULL to just use the default in-process session.
4641 ///
4642 /// @param[in] asset_id
4643 /// The asset id.
4644 ///
4645 /// @param[in] object_id
4646 /// The object id.
4647 ///
4648 /// @param[in] geo_id
4649 /// The geometry id.
4650 ///
4651 /// @param[in] part_id
4652 /// The part id.
4653 ///
4654 /// @param[out] info
4655 /// The curve info represents the meta-data about
4656 /// the curves, including the type, order,
4657 /// and periodicity.
4658 ///
4659 HAPI_DECL HAPI_GetCurveInfo( const HAPI_Session * session,
4660  HAPI_AssetId asset_id,
4661  HAPI_ObjectId object_id,
4662  HAPI_GeoId geo_id,
4663  HAPI_PartId part_id,
4664  HAPI_CurveInfo * info );
4665 
4666 /// @brief Retrieve the number of vertices for each curve in the part.
4667 ///
4668 /// @param[in] session
4669 /// The session of Houdini you are interacting with.
4670 /// See @ref HAPI_Sessions for more on sessions.
4671 /// Pass NULL to just use the default in-process session.
4672 ///
4673 /// @param[in] asset_id
4674 /// The asset id.
4675 ///
4676 /// @param[in] object_id
4677 /// The object id.
4678 ///
4679 /// @param[in] geo_id
4680 /// The geometry id.
4681 ///
4682 /// @param[in] part_id
4683 /// The part id.
4684 ///
4685 /// @param[out] counts_array
4686 /// The number of cvs each curve contains
4687 ///
4688 /// @param[in] start
4689 /// The index of the first curve.
4690 ///
4691 /// @param[in] length
4692 /// The number of curves' counts to retrieve.
4693 ///
4694 HAPI_DECL HAPI_GetCurveCounts( const HAPI_Session * session,
4695  HAPI_AssetId asset_id,
4696  HAPI_ObjectId object_id,
4697  HAPI_GeoId geo_id,
4698  HAPI_PartId part_id,
4699  int * counts_array,
4700  int start, int length );
4701 
4702 /// @brief Retrieve the orders for each curve in the part if the
4703 /// curve has varying order.
4704 ///
4705 /// @param[in] session
4706 /// The session of Houdini you are interacting with.
4707 /// See @ref HAPI_Sessions for more on sessions.
4708 /// Pass NULL to just use the default in-process session.
4709 ///
4710 /// @param[in] asset_id
4711 /// The asset id.
4712 ///
4713 /// @param[in] object_id
4714 /// The object id.
4715 ///
4716 /// @param[in] geo_id
4717 /// The geometry id.
4718 ///
4719 /// @param[in] part_id
4720 /// The part id.
4721 ///
4722 /// @param[out] orders_array
4723 /// The order of each curve will be returned in this
4724 /// array.
4725 ///
4726 /// @param[in] start
4727 /// The index of the first curve.
4728 ///
4729 /// @param[in] length
4730 /// The number of curves' orders to retrieve.
4731 ///
4732 HAPI_DECL HAPI_GetCurveOrders( const HAPI_Session * session,
4733  HAPI_AssetId asset_id,
4734  HAPI_ObjectId object_id,
4735  HAPI_GeoId geo_id,
4736  HAPI_PartId part_id,
4737  int * orders_array,
4738  int start, int length );
4739 
4740 /// @brief Retrieve the knots of the curves in this part.
4741 ///
4742 /// @param[in] session
4743 /// The session of Houdini you are interacting with.
4744 /// See @ref HAPI_Sessions for more on sessions.
4745 /// Pass NULL to just use the default in-process session.
4746 ///
4747 /// @param[in] asset_id
4748 /// The asset id.
4749 ///
4750 /// @param[in] object_id
4751 /// The object id.
4752 ///
4753 /// @param[in] geo_id
4754 /// The geometry id.
4755 ///
4756 /// @param[in] part_id
4757 /// The part id.
4758 ///
4759 /// @param[out] knots_array
4760 /// The knots of each curve will be returned in this
4761 /// array.
4762 ///
4763 /// @param[in] start
4764 /// The index of the first curve.
4765 ///
4766 /// @param[in] length
4767 /// The number of curves' knots to retrieve. The
4768 /// length of all the knots on a single curve is
4769 /// the order of that curve plus the number of
4770 /// vertices (see ::HAPI_GetCurveOrders(),
4771 /// and ::HAPI_GetCurveCounts()).
4772 ///
4773 HAPI_DECL HAPI_GetCurveKnots( const HAPI_Session * session,
4774  HAPI_AssetId asset_id,
4775  HAPI_ObjectId object_id,
4776  HAPI_GeoId geo_id,
4777  HAPI_PartId part_id,
4778  float * knots_array,
4779  int start, int length );
4780 
4781 /// @brief Set meta-data for the curve mesh, including the
4782 /// curve type, order, and periodicity.
4783 ///
4784 /// @param[in] session
4785 /// The session of Houdini you are interacting with.
4786 /// See @ref HAPI_Sessions for more on sessions.
4787 /// Pass NULL to just use the default in-process session.
4788 ///
4789 /// @param[in] asset_id
4790 /// The asset id.
4791 ///
4792 /// @param[in] object_id
4793 /// The object id.
4794 ///
4795 /// @param[in] geo_id
4796 /// The geometry id.
4797 ///
4798 /// @param[in] part_id
4799 /// Currently unused. Input asset geos are assumed
4800 /// to have only one part.
4801 ///
4802 /// @param[in] info
4803 /// The curve info represents the meta-data about
4804 /// the curves, including the type, order,
4805 /// and periodicity.
4806 ///
4807 HAPI_DECL HAPI_SetCurveInfo( const HAPI_Session * session,
4808  HAPI_AssetId asset_id,
4809  HAPI_ObjectId object_id,
4810  HAPI_GeoId geo_id,
4811  HAPI_PartId part_id,
4812  const HAPI_CurveInfo * info );
4813 
4814 /// @brief Set the number of vertices for each curve in the part.
4815 ///
4816 /// @param[in] session
4817 /// The session of Houdini you are interacting with.
4818 /// See @ref HAPI_Sessions for more on sessions.
4819 /// Pass NULL to just use the default in-process session.
4820 ///
4821 /// @param[in] asset_id
4822 /// The asset id.
4823 ///
4824 /// @param[in] object_id
4825 /// The object id.
4826 ///
4827 /// @param[in] geo_id
4828 /// The geometry id.
4829 ///
4830 /// @param[in] part_id
4831 /// Currently unused. Input asset geos are assumed
4832 /// to have only one part.
4833 ///
4834 /// @param[in] counts_array
4835 /// The number of cvs each curve contains.
4836 ///
4837 /// @param[in] start
4838 /// The index of the first curve.
4839 ///
4840 /// @param[in] length
4841 /// The number of curves' counts to set.
4842 ///
4843 HAPI_DECL HAPI_SetCurveCounts( const HAPI_Session * session,
4844  HAPI_AssetId asset_id,
4845  HAPI_ObjectId object_id,
4846  HAPI_GeoId geo_id,
4847  HAPI_PartId part_id,
4848  const int * counts_array,
4849  int start, int length );
4850 
4851 /// @brief Set the orders for each curve in the part if the
4852 /// curve has varying order.
4853 ///
4854 /// @param[in] session
4855 /// The session of Houdini you are interacting with.
4856 /// See @ref HAPI_Sessions for more on sessions.
4857 /// Pass NULL to just use the default in-process session.
4858 ///
4859 /// @param[in] asset_id
4860 /// The asset id.
4861 ///
4862 /// @param[in] object_id
4863 /// The object id.
4864 ///
4865 /// @param[in] geo_id
4866 /// The geometry id.
4867 ///
4868 /// @param[in] part_id
4869 /// Currently unused. Input asset geos are assumed
4870 /// to have only one part.
4871 ///
4872 /// @param[in] orders_array
4873 /// The orders of each curve.
4874 ///
4875 /// @param[in] start
4876 /// The index of the first curve.
4877 ///
4878 /// @param[in] length
4879 /// The number of curves' orders to retrieve.
4880 ///
4881 HAPI_DECL HAPI_SetCurveOrders( const HAPI_Session * session,
4882  HAPI_AssetId asset_id,
4883  HAPI_ObjectId object_id,
4884  HAPI_GeoId geo_id,
4885  HAPI_PartId part_id,
4886  const int * orders_array,
4887  int start, int length );
4888 
4889 /// @brief Set the knots of the curves in this part.
4890 ///
4891 /// @param[in] session
4892 /// The session of Houdini you are interacting with.
4893 /// See @ref HAPI_Sessions for more on sessions.
4894 /// Pass NULL to just use the default in-process session.
4895 ///
4896 /// @param[in] asset_id
4897 /// The asset id.
4898 ///
4899 /// @param[in] object_id
4900 /// The object id.
4901 ///
4902 /// @param[in] geo_id
4903 /// The geometry id.
4904 ///
4905 /// @param[in] part_id
4906 /// Currently unused. Input asset geos are assumed
4907 /// to have only one part.
4908 ///
4909 /// @param[in] knots_array
4910 /// The knots of each curve.
4911 ///
4912 /// @param[in] start
4913 /// The index of the first curve.
4914 ///
4915 /// @param[in] length
4916 /// The number of curves' knots to set. The
4917 /// length of all the knots on a single curve is
4918 /// the order of that curve plus the number of
4919 /// vertices (see ::HAPI_SetCurveOrders(),
4920 /// and ::HAPI_SetCurveCounts()).
4921 ///
4922 HAPI_DECL HAPI_SetCurveKnots( const HAPI_Session * session,
4923  HAPI_AssetId asset_id,
4924  HAPI_ObjectId object_id,
4925  HAPI_GeoId geo_id,
4926  HAPI_PartId part_id,
4927  const float * knots_array,
4928  int start, int length );
4929 
4930 // CACHING ------------------------------------------------------------------
4931 
4932 /// @brief Get the number of currently active caches.
4933 ///
4934 /// @param[in] session
4935 /// The session of Houdini you are interacting with.
4936 /// See @ref HAPI_Sessions for more on sessions.
4937 /// Pass NULL to just use the default in-process session.
4938 ///
4939 /// @param[out] active_cache_count
4940 /// The number of currently active caches.
4941 ///
4943  int * active_cache_count );
4944 
4945 /// @brief Get the names of the currently active caches.
4946 ///
4947 /// Requires a valid active cache count which you get from:
4948 /// ::HAPI_GetActiveCacheCount().
4949 ///
4950 /// @param[in] session
4951 /// The session of Houdini you are interacting with.
4952 /// See @ref HAPI_Sessions for more on sessions.
4953 /// Pass NULL to just use the default in-process session.
4954 ///
4955 /// @param[out] cache_names_array
4956 /// String array with the returned cache names. Must be
4957 /// at least the size of @a active_cache_count.
4958 ///
4959 /// @param[in] active_cache_count
4960 /// The count returned by ::HAPI_GetActiveCacheCount().
4961 ///
4963  HAPI_StringHandle * cache_names_array,
4964  int active_cache_count );
4965 
4966 /// @brief Lets you inspect specific properties of the different memory
4967 /// caches in the current Houdini context.
4968 ///
4969 /// @param[in] session
4970 /// The session of Houdini you are interacting with.
4971 /// See @ref HAPI_Sessions for more on sessions.
4972 /// Pass NULL to just use the default in-process session.
4973 ///
4974 /// @param[in] cache_name
4975 /// Cache name from ::HAPI_GetActiveCacheNames().
4976 ///
4977 /// @param[in] cache_property
4978 /// The specific property of the cache to get the value for.
4979 ///
4980 /// @param[out] property_value
4981 /// Returned property value.
4982 ///
4984  const char * cache_name,
4985  HAPI_CacheProperty cache_property,
4986  int * property_value );
4987 
4988 /// @brief Lets you modify specific properties of the different memory
4989 /// caches in the current Houdini context. This includes clearing
4990 /// caches, reducing their memory use, or changing how memory limits
4991 /// are respected by a cache.
4992 ///
4993 /// @param[in] session
4994 /// The session of Houdini you are interacting with.
4995 /// See @ref HAPI_Sessions for more on sessions.
4996 /// Pass NULL to just use the default in-process session.
4997 ///
4998 /// @param[in] cache_name
4999 /// Cache name from ::HAPI_GetActiveCacheNames().
5000 ///
5001 /// @param[in] cache_property
5002 /// The specific property of the cache to modify.
5003 ///
5004 /// @param[in] property_value
5005 /// The new property value.
5006 ///
5008  const char * cache_name,
5009  HAPI_CacheProperty cache_property,
5010  int property_value );
5011 
5012 /// @brief Saves a geometry to file. The type of file to save is
5013 /// to be determined by the extension ie. .bgeo, .obj
5014 ///
5015 /// @param[in] session
5016 /// The session of Houdini you are interacting with.
5017 /// See @ref HAPI_Sessions for more on sessions.
5018 /// Pass NULL to just use the default in-process session.
5019 ///
5020 /// @param[in] asset_id
5021 /// The asset id.
5022 ///
5023 /// @param[in] object_id
5024 /// The object id.
5025 ///
5026 /// @param[in] geo_id
5027 /// The geometry id.
5028 ///
5029 /// @param[in] file_name
5030 /// The name of the file to be saved. The extension
5031 /// of the file determines its type.
5032 ///
5033 HAPI_DECL HAPI_SaveGeoToFile( const HAPI_Session * session,
5034  HAPI_AssetId asset_id,
5035  HAPI_ObjectId object_id,
5036  HAPI_GeoId geo_id,
5037  const char * file_name );
5038 
5039 /// @brief Loads a geometry file and put its contents onto a SOP
5040 /// node.
5041 ///
5042 /// @param[in] session
5043 /// The session of Houdini you are interacting with.
5044 /// See @ref HAPI_Sessions for more on sessions.
5045 /// Pass NULL to just use the default in-process session.
5046 ///
5047 /// @param[in] asset_id
5048 /// The asset id.
5049 ///
5050 /// @param[in] object_id
5051 /// The object id.
5052 ///
5053 /// @param[in] geo_id
5054 /// The geometry id.
5055 ///
5056 /// @param[in] file_name
5057 /// The name of the file to be loaded
5058 ///
5060  HAPI_AssetId asset_id,
5061  HAPI_ObjectId object_id,
5062  HAPI_GeoId geo_id,
5063  const char * file_name );
5064 
5065 /// @brief Cache the current state of the geo to memory, given the
5066 /// format, and return the size. Use this size with your call
5067 /// to ::HAPI_SaveGeoToMemory() to copy the cached geo to your
5068 /// buffer. It is guaranteed that the size will not change between
5069 /// your call to ::HAPI_GetGeoSize() and ::HAPI_SaveGeoToMemory().
5070 ///
5071 /// @param[in] session
5072 /// The session of Houdini you are interacting with.
5073 /// See @ref HAPI_Sessions for more on sessions.
5074 /// Pass NULL to just use the default in-process session.
5075 ///
5076 /// @param[in] asset_id
5077 /// The asset id.
5078 ///
5079 /// @param[in] object_id
5080 /// The object id.
5081 ///
5082 /// @param[in] geo_id
5083 /// The geometry id.
5084 ///
5085 /// @param[in] format
5086 /// The file format, ie. "obj", "bgeo" etc.
5087 ///
5088 /// @param[out] size
5089 /// The size of the buffer required to hold the output.
5090 ///
5091 HAPI_DECL HAPI_GetGeoSize( const HAPI_Session * session,
5092  HAPI_AssetId asset_id,
5093  HAPI_ObjectId object_id,
5094  HAPI_GeoId geo_id,
5095  const char * format,
5096  int * size );
5097 
5098 /// @brief Saves the cached geometry to your buffer in memory,
5099 /// whose format and required size is identified by the call to
5100 /// ::HAPI_GetGeoSize(). The call to ::HAPI_GetGeoSize() is
5101 /// required as ::HAPI_GetGeoSize() does the actual saving work.
5102 ///
5103 /// Also note that this call to ::HAPI_SaveGeoToMemory will delete
5104 /// the internal geo buffer that was cached in the previous call
5105 /// to ::HAPI_GetGeoSize(). This means that you will need to call
5106 /// ::HAPI_GetGeoSize() again before you can call this function.
5107 ///
5108 /// @param[in] session
5109 /// The session of Houdini you are interacting with.
5110 /// See @ref HAPI_Sessions for more on sessions.
5111 /// Pass NULL to just use the default in-process session.
5112 ///
5113 /// @param[in] asset_id
5114 /// The asset id.
5115 ///
5116 /// @param[in] object_id
5117 /// The object id.
5118 ///
5119 /// @param[in] geo_id
5120 /// The geometry id.
5121 ///
5122 /// @param[out] buffer
5123 /// The buffer we will write into.
5124 ///
5125 /// @param[in] length
5126 /// The size of the buffer passed in.
5127 ///
5129  HAPI_AssetId asset_id,
5130  HAPI_ObjectId object_id,
5131  HAPI_GeoId geo_id,
5132  char * buffer,
5133  int length );
5134 
5135 /// @brief Loads a geometry from memory and put its
5136 /// contents onto a SOP node.
5137 ///
5138 /// @param[in] session
5139 /// The session of Houdini you are interacting with.
5140 /// See @ref HAPI_Sessions for more on sessions.
5141 /// Pass NULL to just use the default in-process session.
5142 ///
5143 /// @param[in] asset_id
5144 /// The asset id.
5145 ///
5146 /// @param[in] object_id
5147 /// The object id.
5148 ///
5149 /// @param[in] geo_id
5150 /// The geometry id.
5151 ///
5152 /// @param[in] format
5153 /// The file format, ie. "obj", "bgeo" etc.
5154 ///
5155 /// @param[in] buffer
5156 /// The buffer we will read the geomtry from.
5157 ///
5158 /// @param[in] length
5159 /// The size of the buffer passed in.
5160 ///
5162  HAPI_AssetId asset_id,
5163  HAPI_ObjectId object_id,
5164  HAPI_GeoId geo_id,
5165  const char * format,
5166  const char * buffer,
5167  int length );
5168 
5169 #endif // __HAPI_h__
HAPI_DECL HAPI_RenameNode(const HAPI_Session *session, HAPI_NodeId node_id, const char *new_name)
Rename a node that you created. Only nodes with their HAPI_NodeInfo::createdPostAssetLoad set to true...
HAPI_DECL HAPI_GetSupportedImageFileFormatCount(const HAPI_Session *session, int *file_format_count)
Get the number of supported texture file formats.
HAPI_DECL HAPI_GetActiveCacheNames(const HAPI_Session *session, HAPI_StringHandle *cache_names_array, int active_cache_count)
Get the names of the currently active caches.
HAPI_GetMaterialOnGroup(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *group_name, HAPI_MaterialInfo *material_info)
Get the material on a group. Use the HAPI_GetGroupMembership() call to determine where the material s...
HAPI_DECL HAPI_SetServerEnvString(const HAPI_Session *session, const char *variable_name, const char *value)
Set environment variable for the server process as a string.
HAPI_DECL HAPI_SetCurveKnots(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const float *knots_array, int start, int length)
Set the knots of the curves in this part.
HAPI_DECL HAPI_LoadGeoFromFile(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *file_name)
Loads a geometry file and put its contents onto a SOP node.
HAPI_DECL HAPI_GetPreset(const HAPI_Session *session, HAPI_NodeId node_id, char *buffer, int buffer_length)
Generates a preset for the given asset.
HAPI_DECL HAPI_GetActiveCacheCount(const HAPI_Session *session, int *active_cache_count)
Get the number of currently active caches.
HAPI_DECL HAPI_GetParmStringValue(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, HAPI_Bool evaluate, HAPI_StringHandle *value)
Get single parm string value by name.
HAPI_DECL HAPI_SetAttributeInt64Data(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const HAPI_Int64 *data_array, int start, int length)
Set 64-bit attribute integer data.
HAPI_DECL HAPI_GetNodeNetworkChildren(const HAPI_Session *session, HAPI_NodeId network_node_id, HAPI_NodeId *child_node_ids_array, int count)
Get the node ids of the children nodes of the specified parent node network.
HAPI_DECL HAPI_LoadGeoFromMemory(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *format, const char *buffer, int length)
Loads a geometry from memory and put its contents onto a SOP node.
HAPI_DECL HAPI_GetCookingTotalCount(const HAPI_Session *session, int *count)
Get total number of nodes that need to cook in the current session.
HAPI_DECL HAPI_IsSessionValid(const HAPI_Session *session)
Checks whether the session identified by HAPI_Session::id is a valid session opened in the implementa...
HAPI_DECL HAPI_GetFaceCounts(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *face_counts_array, int start, int length)
Get the array of faces where the nth integer in the array is the number of vertices the nth face has...
HAPI_DECL HAPI_SetObjectTransform(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, const HAPI_TransformEuler *transform)
Set the transform of an individual object. This is mostly used with marshaled geometry objects...
HAPI_DECL HAPI_GetCurveCounts(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *counts_array, int start, int length)
Retrieve the number of vertices for each curve in the part.
HAPI_DECL HAPI_SaveHIPFile(const HAPI_Session *session, const char *file_path, HAPI_Bool lock_nodes)
Saves a .hip file of the current Houdini scene.
HAPI_DECL HAPI_GetAttributeFloat64Data(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int stride, double *data_array, int start, int length)
Get 64-bit attribute float data.
HAPI_DECL HAPI_CreateCurve(const HAPI_Session *session, HAPI_AssetId *asset_id)
Creates a special curve asset that can be used as input for other assets in the scene.
HAPI_DECL HAPI_DeleteNode(const HAPI_Session *session, HAPI_NodeId node_id)
Delete a node from a node network. Only nodes with their HAPI_NodeInfo::createdPostAssetLoad set to t...
HAPI_DECL HAPI_GetObjectTransforms(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
Fill an array of HAPI_Transform structs with the transforms of each visible object in the scene that ...
HAPI_DECL HAPI_SetTime(const HAPI_Session *session, float time)
Sets the global time of the scene. All API calls will deal with this time to cook.
HAPI_SessionEnvIntType
Definition: HAPI_Common.h:618
HAPI_DECL HAPI_GetParmStringValues(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_Bool evaluate, HAPI_StringHandle *values_array, int start, int length)
Fill an array of parameter string handles. These handles must be used in conjunction with HAPI_GetStr...
HAPI_DECL HAPI_GetTime(const HAPI_Session *session, float *time)
Gets the global time of the scene. All API calls deal with this time to cook.
HAPI_DECL HAPI_GetVolumeVoxelFloatData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, float *values_array, int value_count)
Retrieve floating point values of the voxel at a specific index. Note that you must call HAPI_GetVolu...
HAPI_DECL HAPI_DisconnectAssetTransform(const HAPI_Session *session, HAPI_AssetId asset_id, int input_idx)
Break an existing transform connection.
HAPI_DECL HAPI_SetServerEnvInt(const HAPI_Session *session, const char *variable_name, int value)
Set environment variable for the server process as an integer.
HAPI_DECL HAPI_SetVolumeInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_VolumeInfo *volume_info)
Set the volume info of a geo on a geo input.
HAPI_DECL HAPI_RenderTextureToImage(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_ParmId parm_id)
Render only a single texture to an image for later extraction. An example use of this method might be...
HAPI_DECL HAPI_QueryNodeInput(const HAPI_Session *session, HAPI_NodeId node_to_query, int input_index, HAPI_NodeId *connected_node_id)
Query which node is connected to another node's input.
HAPI_DECL HAPI_SetPartInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_PartInfo *part_info)
Set the main part info struct (HAPI_PartInfo).
HAPI_DECL HAPI_GetVolumeInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_VolumeInfo *volume_info)
Retrieve any meta-data about the volume primitive, including its transform, location, scale, taper, resolution.
HAPI_RSTOrder
Definition: HAPI_Common.h:523
HAPI_DECL HAPI_GetVolumeTileIntData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int fill_value, const HAPI_VolumeTileInfo *tile, int *values_array, int length)
Retrieve integer point values of the voxels pointed to by a tile. Note that a tile may extend beyond ...
HAPI_DECL HAPI_SetTimelineOptions(const HAPI_Session *session, const HAPI_TimelineOptions *timeline_options)
Sets the global timeline options.
HAPI_DECL HAPI_DisconnectNodeInput(const HAPI_Session *session, HAPI_NodeId node_id, int input_index)
Disconnect a node input.
HAPI_DECL HAPI_ConvertMatrixToEuler(const HAPI_Session *session, const float *matrix, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform_out)
Converts a 4x4 matrix into its TRS form.
HAPI_DECL HAPI_GetParmFloatValues(const HAPI_Session *session, HAPI_NodeId node_id, float *values_array, int start, int length)
Fill an array of parameter float values. This is more efficient than calling HAPI_GetParmFloatValue()...
HAPI_DECL HAPI_ConnectAssetGeometry(const HAPI_Session *session, HAPI_AssetId asset_id_from, HAPI_ObjectId object_id_from, HAPI_AssetId asset_id_to, int input_idx)
Connect the geometry of two assets together. For example we can connect a particular piece of geometr...
HAPI_DECL HAPI_CreateNode(const HAPI_Session *session, HAPI_NodeId parent_node_id, const char *operator_name, HAPI_NodeId *new_node_id)
Create a node inside a node network. Nodes created this way will have their HAPI_NodeInfo::createdPos...
HAPI_EnvIntType
Definition: HAPI_Common.h:585
HAPI_DECL HAPI_GetAttributeStringData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int *data_array, int start, int length)
Get attribute string data. Note that the string handles returned are only valid until the next time t...
int HAPI_ObjectId
Definition: HAPI_Common.h:149
HAPI_DECL HAPI_GetInstancedPartIds(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_PartId *instanced_parts_array, int start, int length)
Get the part ids that this instancer part is instancing.
HAPI_DECL HAPI_ConvertTransformQuatToMatrix(const HAPI_Session *session, const HAPI_Transform *transform, float *matrix)
Converts HAPI_Transform into a 4x4 transform matrix.
HAPI_DECL HAPI_SetAnimCurve(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int parm_index, const HAPI_Keyframe *curve_keyframes_array, int keyframe_count)
Set an animation curve on a parameter of an exposed node.
HAPI_DECL HAPI_StartThriftNamedPipeServer(HAPI_Bool auto_close, const char *pipe_name, float timeout_ms, HAPI_ProcessId *process_id)
Starts a Thrift RPC server process on the local host serving clients on a Windows named pipe or a Uni...
HAPI_DECL HAPI_SetPreset(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PresetType preset_type, const char *preset_name, const char *buffer, int buffer_length)
Sets a particular asset to a given preset.
HAPI_DECL HAPI_GetNextVolumeTile(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_VolumeTileInfo *tile)
Iterate through a volume based on 8x8x8 sections of the volume Continue iterating through the value o...
HAPI_DECL HAPI_GetParmInfo(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, HAPI_ParmInfo *parm_info)
Get the parm info of a parameter by parm id.
HAPI_DECL HAPI_GetGroupMembership(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_GroupType group_type, const char *group_name, int *membership_array, int start, int length)
Get group membership.
HAPI_DECL HAPI_GetGeoInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GeoInfo *geo_info)
Get the main geometry info struct (HAPI_GeoInfo). Note that this function will reset all the geo_info...
HAPI_AttributeOwner
Definition: HAPI_Common.h:407
HAPI_DECL HAPI_CheckForNewAssets(const HAPI_Session *session, int *new_asset_count)
Resyncs a HAPI to the underlying Houdini scene after one more more nodes have been created by an asse...
HAPI_DECL HAPI_ExtractImageToFile(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, const char *image_file_format_name, const char *image_planes, const char *destination_folder_path, const char *destination_file_name, int *destination_file_path)
Extract a rendered image to a file.
HAPI_DECL HAPI_GetStringBufLength(const HAPI_Session *session, HAPI_StringHandle string_handle, int *buffer_length)
Gives back the string length of the string with the given handle.
HAPI_DECL HAPI_GetVertexList(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *vertex_list_array, int start, int length)
Get array containing the vertex-point associations where the ith element in the array is the point in...
HAPI_DECL HAPI_RevertGeo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id)
Remove all changes that have been committed to this geometry. If this is an intermediate result node ...
HAPI_DECL HAPI_GetStatus(const HAPI_Session *session, HAPI_StatusType status_type, int *status)
Gives back the status code for a specific status type.
HAPI_DECL HAPI_SetAttributeStringData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const char **data_array, int start, int length)
Set attribute string data.
HAPI_DECL HAPI_GetServerEnvInt(const HAPI_Session *session, const char *variable_name, int *value)
Get environment variable from the server process as an integer.
int HAPI_StringHandle
Definition: HAPI_Common.h:135
HAPI_DECL HAPI_CommitGeo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id)
Commit the current input geometry to the cook engine. Nodes that use this geometry node will re-cook ...
HAPI_StatusVerbosity
Definition: HAPI_Common.h:185
HAPI_DECL HAPI_GetInstancerPartTransforms(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
Get the instancer part's list of transforms on which to instance the instanced parts you got from HAP...
HAPI_DECL HAPI_SetGroupMembership(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GroupType group_type, const char *group_name, const int *membership_array, int start, int length)
Set group membership.
See Attributes.
Definition: HAPI_Common.h:1226
HAPI_DECL HAPI_GetVolumeVoxelIntData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, int *values_array, int value_count)
Retrieve integer point values of the voxel at a specific index. Note that you must call HAPI_GetVolum...
HAPI_DECL HAPI_GetAttributeInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeOwner owner, HAPI_AttributeInfo *attr_info)
Get the main geometry info struct (HAPI_GeoInfo).
HAPI_DECL HAPI_SetEnvFiles(const HAPI_Session *session, const char *houdini_environment_files)
[HAPI_Initialize]
HAPI_DECL HAPI_GetMaterialIdsOnFaces(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_Bool *are_all_the_same, HAPI_MaterialId *material_ids_array, int start, int length)
Get material ids by face/primitive. The material ids returned will be valid as long as the asset is a...
HAPI_DECL HAPI_GetStatusString(const HAPI_Session *session, HAPI_StatusType status_type, char *string_value, int length)
Return status string message.
HAPI_DECL HAPI_GetInputName(const HAPI_Session *session, HAPI_AssetId asset_id, int input_idx, int input_type, HAPI_StringHandle *name)
Get the name of an asset's input. This function will return a string handle for the name which will b...
HAPI_DECL HAPI_DisconnectAssetGeometry(const HAPI_Session *session, HAPI_AssetId asset_id, int input_idx)
Break an existing geometry connection.
HAPI_DECL HAPI_IsInitialized(const HAPI_Session *session)
Check whether the runtime has been initialized yet using HAPI_Initialize(). Function will return HAPI...
HAPI_DECL HAPI_GetNewAssetIds(const HAPI_Session *session, HAPI_AssetId *asset_ids_array, int new_asset_count)
Retrieves the asset ids from the previous call to HAPI_CheckForNewAssets().
HAPI_XYZOrder
Definition: HAPI_Common.h:536
HAPI_DECL HAPI_GetEditableNodeNetworks(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_NodeId *node_networks_array, int count)
Get the node ids of the editable node networks exposed by the asset author.
HAPI_DECL HAPI_RemoveMultiparmInstance(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int instance_position)
Remove the instance of a multiparm given by instance_position.
int HAPI_ParmId
Definition: HAPI_Common.h:145
HAPI_DECL HAPI_GetHandleInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_HandleInfo *handle_infos_array, int start, int length)
Fill an array of HAPI_HandleInfo structs with information about every exposed user manipulation handl...
HAPI_DECL HAPI_CreateCustomSession(HAPI_SessionType session_type, void *session_info, HAPI_Session *session)
Creates a new session using a custom implementation. Note that the implementation dll must already ha...
#define HAPI_DECL_DEPRECATED_REPLACE(hapi_ver, houdini_ver, replacement)
Definition: HAPI_API.h:109
HAPI_DECL HAPI_GetParmIntValue(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, int *value)
Get single parm int value by name.
HAPI_DECL HAPI_BindCustomImplementation(HAPI_SessionType session_type, const char *dll_path)
Binds a new implementation DLL to one of the custom session slots.
HAPI_DECL HAPI_GetInstanceTransforms(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
Fill an array of HAPI_Transform structs with the transforms of each instance of this instancer object...
HAPI_DECL HAPI_GetStatusStringBufLength(const HAPI_Session *session, HAPI_StatusType status_type, HAPI_StatusVerbosity verbosity, int *buffer_length)
Return length of string buffer storing status string message.
HAPI_DECL HAPI_GetCurveInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_CurveInfo *info)
Retrieve any meta-data about the curves, including the curve's type, order, and periodicity.
HAPI_DECL HAPI_GetParmFile(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, const char *destination_directory, const char *destination_file_name)
Extract a file specified by path on a parameter. This will copy the file to the destination directory...
int HAPI_GeoId
Definition: HAPI_Common.h:153
HAPI_DECL HAPI_SetCacheProperty(const HAPI_Session *session, const char *cache_name, HAPI_CacheProperty cache_property, int property_value)
Lets you modify specific properties of the different memory caches in the current Houdini context...
HAPI_DECL HAPI_DestroyAsset(const HAPI_Session *session, HAPI_AssetId asset_id)
Destroy the asset instance.
HAPI_GetMaterialOnPart(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_MaterialInfo *material_info)
Get the material on a part.
HAPI_SessionType
Definition: HAPI_Common.h:234
HAPI_DECL HAPI_CreateThriftNamedPipeSession(HAPI_Session *session, const char *pipe_name)
Creates a Thrift RPC session using a Windows named pipe or a Unix domain socket as transport...
HAPI_DECL HAPI_SetParmIntValue(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, int value)
Set single parm int value by name.
HAPI_DECL HAPI_GetAssetInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_AssetInfo *asset_info)
Fill an asset_info struct.
HAPI_DECL HAPI_GetImagePlanes(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_StringHandle *image_planes_array, int image_plane_count)
Get the names of the image planes of the just rendered image.
int HAPI_MaterialId
Definition: HAPI_Common.h:159
HAPI_DECL HAPI_CreateInputAsset(const HAPI_Session *session, HAPI_AssetId *asset_id, const char *name)
Creates a special asset that can accept geometry input. This will create a dummy OBJ node with a Null...
HAPI_DECL HAPI_SetParmIntValues(const HAPI_Session *session, HAPI_NodeId node_id, const int *values_array, int start, int length)
Set (push) an array of parameter int values.
int HAPI_ProcessId
Definition: HAPI_Common.h:127
HAPI_DECL HAPI_SetGeoInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GeoInfo *geo_info)
Set the main geometry info struct (HAPI_GeoInfo). TODO: This function does nothing at the moment...
HAPI_DECL HAPI_GetAssetTransform(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform)
Get the transform of an asset to match the transform of the asset on the client side.
HAPI_DECL HAPI_GetString(const HAPI_Session *session, HAPI_StringHandle string_handle, char *string_value, int length)
Gives back the string value of the string with the given handle.
HAPI_DECL HAPI_SetAssetTransform(const HAPI_Session *session, HAPI_AssetId asset_id, const HAPI_TransformEuler *transform)
Set the transform of an asset to match the transform of the asset on the client side.
HAPI_DECL HAPI_GetImageMemoryBuffer(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, char *buffer, int length)
Fill your allocated buffer with the just extracted image buffer.
HAPI_DECL HAPI_GetHandleBindingInfo(const HAPI_Session *session, HAPI_AssetId asset_id, int handle_index, HAPI_HandleBindingInfo *handle_binding_infos_array, int start, int length)
Fill an array of HAPI_HandleInfo structs with information about every exposed user manipulation handl...
HAPI_DECL HAPI_CookAsset(const HAPI_Session *session, HAPI_AssetId asset_id, const HAPI_CookOptions *cook_options)
Initiate a cook on this asset. Note that this may trigger cooks on other assets if they are connected...
HAPI_DECL HAPI_GetParmIntValues(const HAPI_Session *session, HAPI_NodeId node_id, int *values_array, int start, int length)
Fill an array of parameter int values. This is more efficient than calling HAPI_GetParmIntValue() ind...
HAPI_DECL HAPI_GetAttributeNames(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_AttributeOwner owner, HAPI_StringHandle *attribute_names_array, int count)
Get list of attribute names by attribute owner. Note that the name string handles are only valid unti...
HAPI_DECL HAPI_SetAttributeFloatData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const float *data_array, int start, int length)
Set attribute float data.
HAPI_DECL HAPI_SetAttributeIntData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const int *data_array, int start, int length)
Set attribute integer data.
HAPI_DECL HAPI_SaveGeoToMemory(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, char *buffer, int length)
Saves the cached geometry to your buffer in memory, whose format and required size is identified by t...
#define HAPI_DECL
Definition: HAPI_API.h:115
HAPI_DECL HAPI_InstantiateAsset(const HAPI_Session *session, const char *asset_name, HAPI_Bool cook_on_load, HAPI_AssetId *asset_id)
Instantiate an asset by name. The asset has to have been loaded as part of an asset library...
HAPI_DECL HAPI_SetTransformAnimCurve(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_TransformComponent trans_comp, const HAPI_Keyframe *curve_keyframes_array, int keyframe_count)
A specialized convenience function to set the T,R,S values on an exposed node.
HAPI_DECL HAPI_SetVolumeTileFloatData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_VolumeTileInfo *tile, const float *values_array, int length)
Set the values of a float tile: this is an 8x8x8 subsection of the volume.
HAPI_DECL HAPI_GetCacheProperty(const HAPI_Session *session, const char *cache_name, HAPI_CacheProperty cache_property, int *property_value)
Lets you inspect specific properties of the different memory caches in the current Houdini context...
HAPI_DECL HAPI_GetCurveOrders(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *orders_array, int start, int length)
Retrieve the orders for each curve in the part if the curve has varying order.
HAPI_DECL HAPI_PythonThreadInterpreterLock(const HAPI_Session *session, HAPI_Bool locked)
Acquires or releases the Python interpreter lock. This is needed if HAPI is called from Python and HA...
int HAPI_AssetId
Definition: HAPI_Common.h:138
HAPI_DECL HAPI_ExtractImageToMemory(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, const char *image_file_format_name, const char *image_planes, int *buffer_size)
Extract a rendered image to memory.
HAPI_DECL HAPI_GetCookingCurrentCount(const HAPI_Session *session, int *count)
Get current number of nodes that have already cooked in the current session. Note that this is a very...
HAPI_DECL HAPI_GetObjects(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectInfo *object_infos_array, int start, int length)
Fill an array of HAPI_ObjectInfo structs with information on each visible object in the scene that ha...
HAPI_DECL HAPI_GetAttributeIntData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int *data_array, int start, int length)
Get attribute integer data.
HAPI_DECL HAPI_SetParmStringValue(const HAPI_Session *session, HAPI_NodeId node_id, const char *value, HAPI_ParmId parm_id, int index)
Set (push) a string value. We can only set a single value at a time because we want to avoid fixed si...
HAPI_DECL HAPI_GetParmChoiceLists(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmChoiceInfo *parm_choices_array, int start, int length)
Fill an array of HAPI_ParmChoiceInfo structs with parameter choice list information from the asset in...
HAPI_DECL HAPI_GetAvailableAssetCount(const HAPI_Session *session, HAPI_AssetLibraryId library_id, int *asset_count)
Get the number of assets contained in an asset library. You should call HAPI_LoadAssetLibraryFromFile...
HAPI_DECL HAPI_Cleanup(const HAPI_Session *session)
Clean up memory. This will unload all assets and you will need to call HAPI_Initialize() again to be ...
HAPI_DECL HAPI_GetParmFloatValue(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, float *value)
Get single parm float value by name.
HAPI_DECL HAPI_GetSessionEnvInt(const HAPI_Session *session, HAPI_SessionEnvIntType int_type, int *value)
Gives back a certain session-specific environment integers like current license type being used...
HAPI_DECL HAPI_AddAttribute(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info)
Add an attribute.
HAPI_DECL HAPI_Initialize(const HAPI_Session *session, const HAPI_CookOptions *cook_options, HAPI_Bool use_cooking_thread, int cooking_thread_stack_size, const char *otl_search_path, const char *dso_search_path, const char *image_dso_search_path, const char *audio_dso_search_path)
Create the asset manager, set up environment variables, and initialize the main Houdini scene...
HAPI_DECL HAPI_Interrupt(const HAPI_Session *session)
Interrupt a cook or load operation.
char HAPI_Bool
Definition: HAPI_Common.h:116
HAPI_DECL HAPI_GetParameters(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmInfo *parm_infos_array, int start, int length)
Fill an array of HAPI_ParmInfo structs with parameter information from the asset instance node...
HAPI_StatusType
Definition: HAPI_Common.h:176
HAPI_DECL HAPI_LoadHIPFile(const HAPI_Session *session, const char *file_name, HAPI_Bool cook_on_load)
Loads a .hip file into the main Houdini scene.
HAPI_DECL HAPI_StartThriftSocketServer(HAPI_Bool auto_close, int port, float timeout_ms, HAPI_ProcessId *process_id)
Starts a Thrift RPC server process on the local host serving clients on a TCP socket and waits for it...
HAPI_DECL HAPI_SetCurveOrders(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const int *orders_array, int start, int length)
Set the orders for each curve in the part if the curve has varying order.
HAPI_PresetType
Definition: HAPI_Common.h:357
HAPI_DECL HAPI_AddGroup(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GroupType group_type, const char *group_name)
Add a group to the input geo with the given type and name.
HAPI_DECL HAPI_GetImageInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_ImageInfo *image_info)
Get information about the image that was just rendered, like resolution and default file format...
HAPI_DECL HAPI_ConvertTransformEulerToMatrix(const HAPI_Session *session, const HAPI_TransformEuler *transform, float *matrix)
Converts HAPI_TransformEuler into a 4x4 transform matrix.
HAPI_DECL HAPI_GetNodeInfo(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_NodeInfo *node_info)
Fill an HAPI_NodeInfo struct.
HAPI_DECL HAPI_SetAttributeFloat64Data(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const double *data_array, int start, int length)
Set 64-bit attribute float data.
HAPI_DECL HAPI_GetSupportedImageFileFormats(const HAPI_Session *session, HAPI_ImageFileFormat *formats_array, int file_format_count)
Get a list of support image file formats - their names, descriptions and a list of recognized extensi...
HAPI_DECL HAPI_GetAvailableAssets(const HAPI_Session *session, HAPI_AssetLibraryId library_id, HAPI_StringHandle *asset_names_array, int asset_count)
Get the names of the assets contained in an asset library.
HAPI_DECL HAPI_ConvertTransform(const HAPI_Session *session, const HAPI_TransformEuler *transform_in, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform_out)
Converts the transform described by a HAPI_TransformEuler struct into a different transform and rotat...
[HAPI_CacheProperty]
Definition: HAPI_Common.h:667
HAPI_DECL HAPI_GetPartInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_PartInfo *part_info)
Get a particular part info struct.
HAPI_DECL HAPI_GetParmInfoFromName(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, HAPI_ParmInfo *parm_info)
Get the parm info of a parameter by name.
HAPI_GroupType
Definition: HAPI_Common.h:398
HAPI_DECL HAPI_SetVolumeTileIntData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_VolumeTileInfo *tile, const int *values_array, int length)
Set the values of an int tile: this is an 8x8x8 subsection of the volume.
HAPI_DECL HAPI_CreateInProcessSession(HAPI_Session *session)
Creates a new in-process session. There can only be one such session per host process.
long long HAPI_Int64
Definition: HAPI_Common.h:120
HAPI_DECL HAPI_SetParmFloatValue(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, float value)
Set single parm float value by name.
HAPI_DECL HAPI_CreateThriftSocketSession(HAPI_Session *session, const char *host_name, int port)
Creates a Thrift RPC session using a TCP socket as transport.
HAPI_DECL HAPI_GetMaterialInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_MaterialInfo *material_info)
Get the material info.
HAPI_DECL HAPI_GetAttributeInt64Data(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int stride, HAPI_Int64 *data_array, int start, int length)
Get attribute 64-bit integer data.
HAPI_DECL HAPI_SetParmFloatValues(const HAPI_Session *session, HAPI_NodeId node_id, const float *values_array, int start, int length)
Set (push) an array of parameter float values.
int HAPI_NodeId
See Nodes Basics.
Definition: HAPI_Common.h:141
HAPI_DECL HAPI_LoadAssetLibraryFromFile(const HAPI_Session *session, const char *file_path, HAPI_Bool allow_overwrite, HAPI_AssetLibraryId *library_id)
Loads a Houdini asset library (OTL) from a .otl file. It does NOT instantiate anything inside the Hou...
HAPI_DECL HAPI_GetFirstVolumeTile(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_VolumeTileInfo *tile)
Iterate through a volume based on 8x8x8 sections of the volume Start iterating through the value of t...
HAPI_CacheProperty
[HAPI_CacheProperty]
Definition: HAPI_Common.h:630
HAPI_DECL HAPI_GetCurveKnots(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, float *knots_array, int start, int length)
Retrieve the knots of the curves in this part.
HAPI_DECL HAPI_GetTimelineOptions(const HAPI_Session *session, HAPI_TimelineOptions *timeline_options)
Gets the current global timeline options.
HAPI_DECL HAPI_GetGeoSize(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *format, int *size)
Cache the current state of the geo to memory, given the format, and return the size. Use this size with your call to HAPI_SaveGeoToMemory() to copy the cached geo to your buffer. It is guaranteed that the size will not change between your call to HAPI_GetGeoSize() and HAPI_SaveGeoToMemory().
HAPI_DECL HAPI_SaveGeoToFile(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *file_name)
Saves a geometry to file. The type of file to save is to be determined by the extension ie...
HAPI_DECL HAPI_GetImagePlaneCount(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, int *image_plane_count)
Get the number of image planes for the just rendered image.
HAPI_DECL HAPI_SetVertexList(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const int *vertex_list_array, int start, int length)
Set array containing the vertex-point associations where the ith element in the array is the point in...
HAPI_DECL HAPI_GetEnvInt(HAPI_EnvIntType int_type, int *value)
Gives back a certain environment integers like version number. Note that you do not need a session fo...
int HAPI_AssetLibraryId
Definition: HAPI_Common.h:137
HAPI_DECL HAPI_ResetSimulation(const HAPI_Session *session, HAPI_AssetId asset_id)
Resets the simulation cache of the asset. This is very useful for assets that use dynamics...
HAPI_DECL HAPI_SetCurveInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const HAPI_CurveInfo *info)
Set meta-data for the curve mesh, including the curve type, order, and periodicity.
HAPI_DECL HAPI_LoadAssetLibraryFromMemory(const HAPI_Session *session, const char *library_buffer, int library_buffer_length, HAPI_Bool allow_overwrite, HAPI_AssetLibraryId *library_id)
Loads a Houdini asset library (OTL) from memory. It does NOT instantiate anything inside the Houdini ...
HAPI_TransformComponent
Definition: HAPI_Common.h:505
HAPI_DECL HAPI_GetAttributeFloatData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, float *data_array, int start, int length)
Get attribute float data.
HAPI_DECL HAPI_GetPresetBufLength(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PresetType preset_type, const char *preset_name, int *buffer_length)
Generate a preset blob of the current state of all the parameter values, cache it, and return its size in bytes.
HAPI_DECL HAPI_IsAssetValid(const HAPI_Session *session, HAPI_AssetId asset_id, int asset_validation_id, int *answer)
Determine if your instance of the asset actually still exists inside the Houdini scene. This is what can be used to determine when the Houdini scene needs to be re-populated using the host application's instances of the assets. Note that this function will ALWAYS return HAPI_RESULT_SUCCESS.
HAPI_DECL HAPI_GetGroupNames(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GroupType group_type, HAPI_StringHandle *group_names_array, int group_count)
Get group names for an entire geo. Please note that this function is NOT per-part, but it is per-geo. The companion function HAPI_GetGroupMembership() IS per-part. Also keep in mind that the name string handles are only valid until the next time this function is called.
HAPI_DECL HAPI_InsertMultiparmInstance(const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int instance_position)
Insert an instance of a multiparm before instance_position.
HAPI_DECL HAPI_SetCurveCounts(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const int *counts_array, int start, int length)
Set the number of vertices for each curve in the part.
HAPI_DECL HAPI_GetServerEnvString(const HAPI_Session *session, const char *variable_name, HAPI_StringHandle *value)
Get environment variable from the server process as a string.
HAPI_DECL HAPI_ConnectNodeInput(const HAPI_Session *session, HAPI_NodeId node_id, int input_index, HAPI_NodeId node_id_to_connect)
Connect two nodes together.
HAPI_DECL HAPI_ConvertMatrixToQuat(const HAPI_Session *session, const float *matrix, HAPI_RSTOrder rst_order, HAPI_Transform *transform_out)
Converts a 4x4 matrix into its TRS form.
HAPI_DECL HAPI_SetImageInfo(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, const HAPI_ImageInfo *image_info)
Set image information like resolution and file format. This information will be used when extracting ...
HAPI_DECL HAPI_SetFaceCounts(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const int *face_counts_array, int start, int length)
Set the array of faces where the nth integer in the array is the number of vertices the nth face has...
int HAPI_PartId
Definition: HAPI_Common.h:157
HAPI_DECL HAPI_CloseSession(const HAPI_Session *session)
Closes a session. If the session has been established using RPC, then the RPC connection is closed...
HAPI_DECL HAPI_ConnectAssetTransform(const HAPI_Session *session, HAPI_AssetId asset_id_from, HAPI_AssetId asset_id_to, int input_idx)
Connect the transform of two assets together.
HAPI_DECL HAPI_GetParmIdFromName(const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, HAPI_ParmId *parm_id)
All parameter APIs require a HAPI_ParmId but if you know the parameter you wish to operate on by name...
HAPI_DECL HAPI_GetVolumeTileFloatData(const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, float fill_value, const HAPI_VolumeTileInfo *tile, float *values_array, int length)
Retrieve floating point values of the voxels pointed to by a tile. Note that a tile may extend beyond...