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 Fill an array of ::HAPI_ParmChoiceInfo structs with parameter
1802 /// choice list information from the asset instance node.
1803 ///
1804 /// @param[in] session
1805 /// The session of Houdini you are interacting with.
1806 /// See @ref HAPI_Sessions for more on sessions.
1807 /// Pass NULL to just use the default in-process session.
1808 ///
1809 /// @param[in] node_id
1810 /// The node id.
1811 ///
1812 /// @param[out] parm_choices_array
1813 /// Array of ::HAPI_ParmChoiceInfo exactly the size of
1814 /// length.
1815 ///
1816 /// @param[in] start
1817 /// First index of range. Must be at least 0 and at
1818 /// most ::HAPI_NodeInfo::parmChoiceCount - 1.
1819 ///
1820 /// @param[in] length
1821 /// Must be at least 1 and at most
1822 /// ::HAPI_NodeInfo::parmChoiceCount - start.
1823 ///
1825  HAPI_NodeId node_id,
1826  HAPI_ParmChoiceInfo *parm_choices_array,
1827  int start, int length );
1828 
1829 /// @brief Set single parm int value by name.
1830 ///
1831 /// @note Regardless of the value, when calling this function
1832 /// on a parameter, if that parameter has a callback function
1833 /// attached to it, that callback function will be called. For
1834 /// example, if the parameter is a button the button will be
1835 /// pressed.
1836 ///
1837 /// @note In threaded mode, this is an _async call_!
1838 ///
1839 /// This API will invoke the cooking thread if threading is
1840 /// enabled. This means it will return immidiately. Use
1841 /// the status and cooking count APIs under DIAGNOSTICS to get
1842 /// a sense of the progress. All other API calls will block
1843 /// until the cook operation has finished.
1844 ///
1845 /// Also note that the cook result won't be of type
1846 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1847 /// Whenever the threading cook is done it will fill the
1848 /// @a cook result which is queried using
1849 /// ::HAPI_STATUS_COOK_RESULT.
1850 ///
1851 /// @param[in] session
1852 /// The session of Houdini you are interacting with.
1853 /// See @ref HAPI_Sessions for more on sessions.
1854 /// Pass NULL to just use the default in-process session.
1855 ///
1856 /// @param[in] node_id
1857 /// The node id.
1858 ///
1859 /// @param[in] parm_name
1860 /// The parm name.
1861 ///
1862 /// @param[in] index
1863 /// Index within the parameter's values tuple.
1864 ///
1865 /// @param[in] value
1866 /// The int value.
1867 ///
1869  HAPI_NodeId node_id,
1870  const char * parm_name,
1871  int index,
1872  int value );
1873 
1874 /// @brief Set (push) an array of parameter int values.
1875 ///
1876 /// @note Regardless of the values, when calling this function
1877 /// on a set of parameters, if any parameter has a callback
1878 /// function attached to it, that callback function will be called.
1879 /// For example, if the parameter is a button the button will be
1880 /// pressed.
1881 ///
1882 /// @note In threaded mode, this is an _async call_!
1883 ///
1884 /// This API will invoke the cooking thread if threading is
1885 /// enabled. This means it will return immidiately. Use
1886 /// the status and cooking count APIs under DIAGNOSTICS to get
1887 /// a sense of the progress. All other API calls will block
1888 /// until the cook operation has finished.
1889 ///
1890 /// Also note that the cook result won't be of type
1891 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1892 /// Whenever the threading cook is done it will fill the
1893 /// @a cook result which is queried using
1894 /// ::HAPI_STATUS_COOK_RESULT.
1895 ///
1896 /// @param[in] session
1897 /// The session of Houdini you are interacting with.
1898 /// See @ref HAPI_Sessions for more on sessions.
1899 /// Pass NULL to just use the default in-process session.
1900 ///
1901 /// @param[in] node_id
1902 /// The node id.
1903 ///
1904 /// @param[in] values_array
1905 /// Array of ints at least the size of length.
1906 ///
1907 /// @param[in] start
1908 /// First index of range. Must be at least 0 and at
1909 /// most ::HAPI_NodeInfo::parmIntValueCount - 1.
1910 ///
1911 /// @param[in] length
1912 /// Must be at least 1 and at most
1913 /// ::HAPI_NodeInfo::parmIntValueCount - start.
1914 ///
1916  HAPI_NodeId node_id,
1917  const int * values_array,
1918  int start, int length );
1919 
1920 /// @brief Set single parm float value by name.
1921 ///
1922 /// @note Regardless of the value, when calling this function
1923 /// on a parameter, if that parameter has a callback function
1924 /// attached to it, that callback function will be called. For
1925 /// example, if the parameter is a button the button will be
1926 /// pressed.
1927 ///
1928 /// @note In threaded mode, this is an _async call_!
1929 ///
1930 /// This API will invoke the cooking thread if threading is
1931 /// enabled. This means it will return immidiately. Use
1932 /// the status and cooking count APIs under DIAGNOSTICS to get
1933 /// a sense of the progress. All other API calls will block
1934 /// until the cook operation has finished.
1935 ///
1936 /// Also note that the cook result won't be of type
1937 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1938 /// Whenever the threading cook is done it will fill the
1939 /// @a cook result which is queried using
1940 /// ::HAPI_STATUS_COOK_RESULT.
1941 ///
1942 /// @param[in] session
1943 /// The session of Houdini you are interacting with.
1944 /// See @ref HAPI_Sessions for more on sessions.
1945 /// Pass NULL to just use the default in-process session.
1946 ///
1947 /// @param[in] node_id
1948 /// The node id.
1949 ///
1950 /// @param[in] parm_name
1951 /// The parm name.
1952 ///
1953 /// @param[in] index
1954 /// Index within the parameter's values tuple.
1955 ///
1956 /// @param[in] value
1957 /// The float value.
1958 ///
1960  HAPI_NodeId node_id,
1961  const char * parm_name,
1962  int index,
1963  float value );
1964 
1965 /// @brief Set (push) an array of parameter float values.
1966 ///
1967 /// @note Regardless of the values, when calling this function
1968 /// on a set of parameters, if any parameter has a callback
1969 /// function attached to it, that callback function will be called.
1970 /// For example, if the parameter is a button the button will be
1971 /// pressed.
1972 ///
1973 /// @note In threaded mode, this is an _async call_!
1974 ///
1975 /// This API will invoke the cooking thread if threading is
1976 /// enabled. This means it will return immidiately. Use
1977 /// the status and cooking count APIs under DIAGNOSTICS to get
1978 /// a sense of the progress. All other API calls will block
1979 /// until the cook operation has finished.
1980 ///
1981 /// Also note that the cook result won't be of type
1982 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
1983 /// Whenever the threading cook is done it will fill the
1984 /// @a cook result which is queried using
1985 /// ::HAPI_STATUS_COOK_RESULT.
1986 ///
1987 /// @param[in] session
1988 /// The session of Houdini you are interacting with.
1989 /// See @ref HAPI_Sessions for more on sessions.
1990 /// Pass NULL to just use the default in-process session.
1991 ///
1992 /// @param[in] node_id
1993 /// The node id.
1994 ///
1995 /// @param[in] values_array
1996 /// Array of floats at least the size of length.
1997 ///
1998 /// @param[in] start
1999 /// First index of range. Must be at least 0 and at
2000 /// most ::HAPI_NodeInfo::parmFloatValueCount - 1.
2001 ///
2002 /// @param[in] length
2003 /// Must be at least 1 and at most
2004 /// ::HAPI_NodeInfo::parmFloatValueCount - start.
2005 ///
2007  HAPI_NodeId node_id,
2008  const float * values_array,
2009  int start, int length );
2010 
2011 /// @brief Set (push) a string value. We can only set a single value at
2012 /// a time because we want to avoid fixed size string buffers.
2013 ///
2014 /// @note Regardless of the value, when calling this function
2015 /// on a parameter, if that parameter has a callback function
2016 /// attached to it, that callback function will be called. For
2017 /// example, if the parameter is a button the button will be
2018 /// pressed.
2019 ///
2020 /// @note In threaded mode, this is an _async call_!
2021 ///
2022 /// This API will invoke the cooking thread if threading is
2023 /// enabled. This means it will return immidiately. Use
2024 /// the status and cooking count APIs under DIAGNOSTICS to get
2025 /// a sense of the progress. All other API calls will block
2026 /// until the cook operation has finished.
2027 ///
2028 /// Also note that the cook result won't be of type
2029 /// ::HAPI_STATUS_CALL_RESULT like all calls (including this one).
2030 /// Whenever the threading cook is done it will fill the
2031 /// @a cook result which is queried using
2032 /// ::HAPI_STATUS_COOK_RESULT.
2033 ///
2034 /// @param[in] session
2035 /// The session of Houdini you are interacting with.
2036 /// See @ref HAPI_Sessions for more on sessions.
2037 /// Pass NULL to just use the default in-process session.
2038 ///
2039 /// @param[in] node_id
2040 /// The node id.
2041 ///
2042 /// @param[in] value
2043 /// The string value.
2044 ///
2045 /// @param[in] parm_id
2046 /// Parameter id of the parameter being updated.
2047 ///
2048 /// @param[in] index
2049 /// Index within the parameter's values tuple.
2050 ///
2052  HAPI_NodeId node_id,
2053  const char * value,
2054  HAPI_ParmId parm_id, int index );
2055 
2056 /// @brief Insert an instance of a multiparm before instance_position.
2057 ///
2058 /// @param[in] session
2059 /// The session of Houdini you are interacting with.
2060 /// See @ref HAPI_Sessions for more on sessions.
2061 /// Pass NULL to just use the default in-process session.
2062 ///
2063 /// @param[in] node_id
2064 /// The node id.
2065 ///
2066 /// @param[in] parm_id
2067 /// A parm id given by a ::HAPI_ParmInfo struct that
2068 /// has type ::HAPI_PARMTYPE_MULTIPARMLIST.
2069 ///
2070 /// @param[in] instance_position
2071 /// The new instance will be inserted at this position
2072 /// index. Do note the multiparms can start at position
2073 /// 1 or 0. Use ::HAPI_ParmInfo::instanceStartOffset to
2074 /// distinguish.
2075 ///
2077  HAPI_NodeId node_id,
2078  HAPI_ParmId parm_id,
2079  int instance_position );
2080 
2081 /// @brief Remove the instance of a multiparm given by instance_position.
2082 ///
2083 /// @param[in] session
2084 /// The session of Houdini you are interacting with.
2085 /// See @ref HAPI_Sessions for more on sessions.
2086 /// Pass NULL to just use the default in-process session.
2087 ///
2088 /// @param[in] node_id
2089 /// The node id.
2090 ///
2091 /// @param[in] parm_id
2092 /// A parm id given by a ::HAPI_ParmInfo struct that
2093 /// has type ::HAPI_PARMTYPE_MULTIPARMLIST.
2094 ///
2095 /// @param[in] instance_position
2096 /// The instance at instance_position will removed.
2097 ///
2099  HAPI_NodeId node_id,
2100  HAPI_ParmId parm_id,
2101  int instance_position );
2102 
2103 // HANDLES ------------------------------------------------------------------
2104 
2105 /// @brief Fill an array of ::HAPI_HandleInfo structs with information
2106 /// about every exposed user manipulation handle on the asset.
2107 ///
2108 /// @param[in] session
2109 /// The session of Houdini you are interacting with.
2110 /// See @ref HAPI_Sessions for more on sessions.
2111 /// Pass NULL to just use the default in-process session.
2112 ///
2113 /// @param[in] asset_id
2114 /// The asset id.
2115 ///
2116 /// @param[out] handle_infos_array
2117 /// Array of ::HAPI_HandleInfo at least the size of length.
2118 ///
2119 /// @param[in] start
2120 /// First index of range. Must be at least 0 and at
2121 /// most ::HAPI_AssetInfo::handleCount - 1.
2122 ///
2123 /// @param[in] length
2124 /// Must be at least 1 and at most
2125 /// ::HAPI_AssetInfo::handleCount - start.
2126 ///
2127 HAPI_DECL HAPI_GetHandleInfo( const HAPI_Session * session,
2128  HAPI_AssetId asset_id,
2129  HAPI_HandleInfo * handle_infos_array,
2130  int start, int length );
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[in] handle_index
2144 /// The index of the handle, from 0 to handleCount - 1
2145 /// from the call to ::HAPI_GetAssetInfo().
2146 ///
2147 /// @param[out] handle_binding_infos_array
2148 /// Array of ::HAPI_HandleBindingInfo at least the size
2149 /// of length.
2150 ///
2151 /// @param[in] start
2152 /// First index of range. Must be at least 0 and at
2153 /// most ::HAPI_HandleInfo::bindingsCount - 1.
2154 ///
2155 /// @param[in] length
2156 /// Must be at least 0 and at most
2157 /// ::HAPI_HandleInfo::bindingsCount - start.
2158 ///
2160  const HAPI_Session * session,
2161  HAPI_AssetId asset_id,
2162  int handle_index,
2163  HAPI_HandleBindingInfo * handle_binding_infos_array,
2164  int start, int length );
2165 
2166 // PRESETS ------------------------------------------------------------------
2167 
2168 /// @brief Generate a preset blob of the current state of all the
2169 /// parameter values, cache it, and return its size in bytes.
2170 ///
2171 /// @param[in] session
2172 /// The session of Houdini you are interacting with.
2173 /// See @ref HAPI_Sessions for more on sessions.
2174 /// Pass NULL to just use the default in-process session.
2175 ///
2176 /// @param[in] node_id
2177 /// The exposed node id.
2178 ///
2179 /// @param[in] preset_type
2180 /// The preset type.
2181 ///
2182 /// @param[in] preset_name
2183 /// Optional. This is only used if the @p preset_type is
2184 /// ::HAPI_PRESETTYPE_IDX. If NULL is given, the preset
2185 /// name will be the same as the name of the node with
2186 /// the given @p node_id.
2187 ///
2188 /// @param[out] buffer_length
2189 /// Size of the buffer.
2190 ///
2192  HAPI_NodeId node_id,
2193  HAPI_PresetType preset_type,
2194  const char * preset_name,
2195  int * buffer_length );
2196 
2197 /// @brief Generates a preset for the given asset.
2198 ///
2199 /// @param[in] session
2200 /// The session of Houdini you are interacting with.
2201 /// See @ref HAPI_Sessions for more on sessions.
2202 /// Pass NULL to just use the default in-process session.
2203 ///
2204 /// @param[in] node_id
2205 /// The exposed node id.
2206 ///
2207 /// @param[out] buffer
2208 /// Buffer to hold the preset data.
2209 ///
2210 /// @param[in] buffer_length
2211 /// Size of the buffer. Should be the same as the length
2212 /// returned by ::HAPI_GetPresetBufLength().
2213 ///
2214 HAPI_DECL HAPI_GetPreset( const HAPI_Session * session,
2215  HAPI_NodeId node_id,
2216  char * buffer,
2217  int buffer_length );
2218 
2219 /// @brief Sets a particular asset to a given preset.
2220 ///
2221 /// @param[in] session
2222 /// The session of Houdini you are interacting with.
2223 /// See @ref HAPI_Sessions for more on sessions.
2224 /// Pass NULL to just use the default in-process session.
2225 ///
2226 /// @param[in] node_id
2227 /// The exposed node id.
2228 ///
2229 /// @param[in] preset_type
2230 /// The preset type.
2231 ///
2232 /// @param[in] preset_name
2233 /// Optional. This is only used if the @p preset_type is
2234 /// ::HAPI_PRESETTYPE_IDX. If NULL is give, the first
2235 /// preset in the IDX file will be chosen.
2236 ///
2237 /// @param[in] buffer
2238 /// Buffer to hold the preset data.
2239 ///
2240 /// @param[in] buffer_length
2241 /// Size of the buffer.
2242 ///
2243 HAPI_DECL HAPI_SetPreset( const HAPI_Session * session,
2244  HAPI_NodeId node_id,
2245  HAPI_PresetType preset_type,
2246  const char * preset_name,
2247  const char * buffer,
2248  int buffer_length );
2249 
2250 // OBJECTS ------------------------------------------------------------------
2251 
2252 /// @brief Fill an array of ::HAPI_ObjectInfo structs with information
2253 /// on each visible object in the scene that has a SOP network
2254 /// (is not a sub-network).
2255 /// Note that this function will reset all the objects'
2256 /// ::HAPI_ObjectInfo.haveGeosChanged flags to false after
2257 /// it returns the original flag values.
2258 ///
2259 /// @param[in] session
2260 /// The session of Houdini you are interacting with.
2261 /// See @ref HAPI_Sessions for more on sessions.
2262 /// Pass NULL to just use the default in-process session.
2263 ///
2264 /// @param[in] asset_id
2265 /// The asset id.
2266 ///
2267 /// @param[out] object_infos_array
2268 /// Array of ::HAPI_ObjectInfo at least the size of
2269 /// length.
2270 ///
2271 /// @param[in] start
2272 /// First object index to begin fill. Must be at least
2273 /// 0 and at most length - 1.
2274 ///
2275 /// @param[in] length
2276 /// Must be at least 0 and at most
2277 /// ::HAPI_AssetInfo::objectCount - start.
2278 ///
2279 HAPI_DECL HAPI_GetObjects( const HAPI_Session * session,
2280  HAPI_AssetId asset_id,
2281  HAPI_ObjectInfo * object_infos_array,
2282  int start, int length );
2283 
2284 /// @brief Fill an array of ::HAPI_Transform structs with the transforms
2285 /// of each visible object in the scene that has a SOP network
2286 /// (is not a sub-network).
2287 /// Note that this function will reset all the objects'
2288 /// ::HAPI_ObjectInfo::hasTransformChanged flags to false after
2289 /// it returns the original flag values.
2290 ///
2291 /// @param[in] session
2292 /// The session of Houdini you are interacting with.
2293 /// See @ref HAPI_Sessions for more on sessions.
2294 /// Pass NULL to just use the default in-process session.
2295 ///
2296 /// @param[in] asset_id
2297 /// The asset id.
2298 ///
2299 /// @param[in] rst_order
2300 /// The order of application of translation, rotation and
2301 /// scale.
2302 ///
2303 /// @param[out] transforms_array
2304 /// Array of ::HAPI_Transform at least the size of
2305 /// length.
2306 ///
2307 /// @param[in] start
2308 /// First index of range. Must be at least 0 and at
2309 /// most ::HAPI_AssetInfo::objectCount - 1.
2310 ///
2311 /// @param[in] length
2312 /// Must be at least 0 and at most
2313 /// ::HAPI_AssetInfo::objectCount - start.
2314 ///
2316  HAPI_AssetId asset_id,
2317  HAPI_RSTOrder rst_order,
2318  HAPI_Transform * transforms_array,
2319  int start, int length );
2320 
2321 /// @brief Fill an array of ::HAPI_Transform structs with the transforms
2322 /// of each instance of this instancer object
2323 ///
2324 /// @param[in] session
2325 /// The session of Houdini you are interacting with.
2326 /// See @ref HAPI_Sessions for more on sessions.
2327 /// Pass NULL to just use the default in-process session.
2328 ///
2329 /// @param[in] asset_id
2330 /// The asset id.
2331 ///
2332 /// @param[in] object_id
2333 /// The object id.
2334 ///
2335 /// @param[in] geo_id
2336 /// The geometry id.
2337 ///
2338 /// @param[in] rst_order
2339 /// The order of application of translation, rotation and
2340 /// scale.
2341 ///
2342 /// @param[out] transforms_array
2343 /// Array of ::HAPI_Transform at least the size of length.
2344 ///
2345 /// @param[in] start
2346 /// First index of range. Must be at least 0 and at
2347 /// most ::HAPI_PartInfo::pointCount - 1.
2348 ///
2349 /// @param[in] length
2350 /// Must be at least 0 and at most
2351 /// ::HAPI_PartInfo::pointCount - @p start.
2352 ///
2354  HAPI_AssetId asset_id,
2355  HAPI_ObjectId object_id,
2356  HAPI_GeoId geo_id,
2357  HAPI_RSTOrder rst_order,
2358  HAPI_Transform * transforms_array,
2359  int start, int length );
2360 
2361 /// @brief Set the transform of an individual object. This is mostly used
2362 /// with marshaled geometry objects. Trying to modify the
2363 /// transform of an object belonging to an asset other than
2364 /// the special External Input Asset with object id 0 will most
2365 /// likely fail, unless the transforms are exposed as editable
2366 /// via exposed parameters.
2367 ///
2368 /// @param[in] session
2369 /// The session of Houdini you are interacting with.
2370 /// See @ref HAPI_Sessions for more on sessions.
2371 /// Pass NULL to just use the default in-process session.
2372 ///
2373 /// @param[in] asset_id
2374 /// The asset id.
2375 ///
2376 /// @param[in] object_id
2377 /// The object id.
2378 ///
2379 /// @param[in] transform
2380 /// A ::HAPI_TransformEuler that stores the transform.
2381 ///
2383  HAPI_AssetId asset_id,
2384  HAPI_ObjectId object_id,
2385  const HAPI_TransformEuler * transform );
2386 
2387 // GEOMETRY GETTERS ---------------------------------------------------------
2388 
2389 /// @brief Get the main geometry info struct (::HAPI_GeoInfo). Note that
2390 /// this function will reset all the geo_infos'
2391 /// ::HAPI_GeoInfo::hasGeoChanged flags to false after it returns
2392 /// the original flag values.
2393 ///
2394 /// @param[in] session
2395 /// The session of Houdini you are interacting with.
2396 /// See @ref HAPI_Sessions for more on sessions.
2397 /// Pass NULL to just use the default in-process session.
2398 ///
2399 /// @param[in] asset_id
2400 /// The asset id.
2401 ///
2402 /// @param[in] object_id
2403 /// The object id.
2404 ///
2405 /// @param[in] geo_id
2406 /// The geometry id.
2407 ///
2408 /// @param[out] geo_info
2409 /// ::HAPI_GeoInfo return value.
2410 ///
2411 HAPI_DECL HAPI_GetGeoInfo( const HAPI_Session * session,
2412  HAPI_AssetId asset_id,
2413  HAPI_ObjectId object_id,
2414  HAPI_GeoId geo_id,
2415  HAPI_GeoInfo * geo_info );
2416 
2417 /// @brief Get a particular part info struct.
2418 ///
2419 /// @param[in] session
2420 /// The session of Houdini you are interacting with.
2421 /// See @ref HAPI_Sessions for more on sessions.
2422 /// Pass NULL to just use the default in-process session.
2423 ///
2424 /// @param[in] asset_id
2425 /// The asset id.
2426 ///
2427 /// @param[in] object_id
2428 /// The object id.
2429 ///
2430 /// @param[in] geo_id
2431 /// The geometry id.
2432 ///
2433 /// @param[in] part_id
2434 /// The part id.
2435 ///
2436 /// @param[out] part_info
2437 /// ::HAPI_PartInfo return value.
2438 ///
2439 HAPI_DECL HAPI_GetPartInfo( const HAPI_Session * session,
2440  HAPI_AssetId asset_id, HAPI_ObjectId object_id,
2441  HAPI_GeoId geo_id, HAPI_PartId part_id,
2442  HAPI_PartInfo * part_info );
2443 
2444 /// @brief Get the array of faces where the nth integer in the array is
2445 /// the number of vertices the nth face has.
2446 ///
2447 /// @param[in] session
2448 /// The session of Houdini you are interacting with.
2449 /// See @ref HAPI_Sessions for more on sessions.
2450 /// Pass NULL to just use the default in-process session.
2451 ///
2452 /// @param[in] asset_id
2453 /// The asset id.
2454 ///
2455 /// @param[in] object_id
2456 /// The object id.
2457 ///
2458 /// @param[in] geo_id
2459 /// The geometry id.
2460 ///
2461 /// @param[in] part_id
2462 /// The part id.
2463 ///
2464 /// @param[out] face_counts_array
2465 /// An integer array at least the size of length.
2466 ///
2467 /// @param[in] start
2468 /// First index of range. Must be at least 0 and at
2469 /// most ::HAPI_PartInfo::faceCount - 1.
2470 ///
2471 /// @param[in] length
2472 /// Must be at least 0 and at most
2473 /// ::HAPI_PartInfo::faceCount - @p start.
2474 ///
2475 HAPI_DECL HAPI_GetFaceCounts( const HAPI_Session * session,
2476  HAPI_AssetId asset_id,
2477  HAPI_ObjectId object_id,
2478  HAPI_GeoId geo_id,
2479  HAPI_PartId part_id,
2480  int * face_counts_array,
2481  int start, int length );
2482 
2483 /// @brief Get array containing the vertex-point associations where the
2484 /// ith element in the array is the point index the ith vertex
2485 /// associates with.
2486 ///
2487 /// @param[in] session
2488 /// The session of Houdini you are interacting with.
2489 /// See @ref HAPI_Sessions for more on sessions.
2490 /// Pass NULL to just use the default in-process session.
2491 ///
2492 /// @param[in] asset_id
2493 /// The asset id.
2494 ///
2495 /// @param[in] object_id
2496 /// The object id.
2497 ///
2498 /// @param[in] geo_id
2499 /// The geometry id.
2500 ///
2501 /// @param[in] part_id
2502 /// The part id.
2503 ///
2504 /// @param[out] vertex_list_array
2505 /// An integer array at least the size of length.
2506 ///
2507 /// @param[in] start
2508 /// First index of range. Must be at least 0 and at
2509 /// most ::HAPI_PartInfo::vertexCount - 1.
2510 ///
2511 /// @param[in] length
2512 /// Must be at least 0 and at most
2513 /// ::HAPI_PartInfo::vertexCount - @p start.
2514 ///
2515 HAPI_DECL HAPI_GetVertexList( const HAPI_Session * session,
2516  HAPI_AssetId asset_id,
2517  HAPI_ObjectId object_id,
2518  HAPI_GeoId geo_id,
2519  HAPI_PartId part_id,
2520  int * vertex_list_array,
2521  int start, int length );
2522 
2523 /// @brief Get the main geometry info struct (::HAPI_GeoInfo).
2524 ///
2525 /// @param[in] session
2526 /// The session of Houdini you are interacting with.
2527 /// See @ref HAPI_Sessions for more on sessions.
2528 /// Pass NULL to just use the default in-process session.
2529 ///
2530 /// @param[in] asset_id
2531 /// The asset id.
2532 ///
2533 /// @param[in] object_id
2534 /// The object id.
2535 ///
2536 /// @param[in] geo_id
2537 /// The geometry id.
2538 ///
2539 /// @param[in] part_id
2540 /// The part id.
2541 ///
2542 /// @param[in] name
2543 /// Attribute name.
2544 ///
2545 /// @param[in] owner
2546 /// Attribute owner.
2547 ///
2548 /// @param[out] attr_info
2549 /// ::HAPI_AttributeInfo to be filled. Check
2550 /// ::HAPI_AttributeInfo::exists to see if this attribute
2551 /// exists.
2552 ///
2554  HAPI_AssetId asset_id,
2555  HAPI_ObjectId object_id,
2556  HAPI_GeoId geo_id,
2557  HAPI_PartId part_id,
2558  const char * name,
2559  HAPI_AttributeOwner owner,
2560  HAPI_AttributeInfo * attr_info );
2561 
2562 /// @brief Get list of attribute names by attribute owner. Note that the
2563 /// name string handles are only valid until the next time this
2564 /// function is called.
2565 ///
2566 /// @param[in] session
2567 /// The session of Houdini you are interacting with.
2568 /// See @ref HAPI_Sessions for more on sessions.
2569 /// Pass NULL to just use the default in-process session.
2570 ///
2571 /// @param[in] asset_id
2572 /// The asset id.
2573 ///
2574 /// @param[in] object_id
2575 /// The object id.
2576 ///
2577 /// @param[in] geo_id
2578 /// The geometry id.
2579 ///
2580 /// @param[in] part_id
2581 /// The part id.
2582 ///
2583 /// @param[in] owner
2584 /// The ::HAPI_AttributeOwner enum value specifying the
2585 /// owner of the attribute.
2586 ///
2587 /// @param[out] attribute_names_array
2588 /// Array of ints (string handles) to house the
2589 /// attribute names. Should be exactly the size of the
2590 /// appropriate attribute owner type count
2591 /// in ::HAPI_PartInfo.
2592 ///
2593 /// @param[in] count
2594 /// Sanity check count. Must be equal to the appropriate
2595 /// attribute owner type count in ::HAPI_PartInfo.
2596 ///
2598  HAPI_AssetId asset_id,
2599  HAPI_ObjectId object_id,
2600  HAPI_GeoId geo_id,
2601  HAPI_PartId part_id,
2602  HAPI_AttributeOwner owner,
2603  HAPI_StringHandle *attribute_names_array,
2604  int count );
2605 
2606 /// @brief Get attribute integer data.
2607 ///
2608 /// @param[in] session
2609 /// The session of Houdini you are interacting with.
2610 /// See @ref HAPI_Sessions for more on sessions.
2611 /// Pass NULL to just use the default in-process session.
2612 ///
2613 /// @param[in] asset_id
2614 /// The asset id.
2615 ///
2616 /// @param[in] object_id
2617 /// The object id.
2618 ///
2619 /// @param[in] geo_id
2620 /// The geometry id.
2621 ///
2622 /// @param[in] part_id
2623 /// The part id.
2624 ///
2625 /// @param[in] name
2626 /// Attribute name.
2627 ///
2628 /// @param[in] attr_info
2629 /// ::HAPI_AttributeInfo used as input for what tuple size.
2630 /// you want. Also contains some sanity checks like
2631 /// data type. Generally should be the same struct
2632 /// returned by ::HAPI_GetAttributeInfo().
2633 ///
2634 /// @param[out] data_array
2635 /// An integer array at least the size of length.
2636 ///
2637 /// @param[in] start
2638 /// First index of range. Must be at least 0 and at
2639 /// most ::HAPI_AttributeInfo::count - 1.
2640 ///
2641 /// @param[in] length
2642 /// Must be at least 0 and at most
2643 /// ::HAPI_AttributeInfo::count - @p start.
2644 ///
2646  HAPI_AssetId asset_id,
2647  HAPI_ObjectId object_id,
2648  HAPI_GeoId geo_id,
2649  HAPI_PartId part_id,
2650  const char * name,
2651  HAPI_AttributeInfo * attr_info,
2652  int * data_array,
2653  int start, int length );
2654 
2655 /// @brief Get attribute 64-bit integer data.
2656 ///
2657 /// @param[in] session
2658 /// The session of Houdini you are interacting with.
2659 /// See @ref HAPI_Sessions for more on sessions.
2660 /// Pass NULL to just use the default in-process session.
2661 ///
2662 /// @param[in] asset_id
2663 /// The asset id.
2664 ///
2665 /// @param[in] object_id
2666 /// The object id.
2667 ///
2668 /// @param[in] geo_id
2669 /// The geometry id.
2670 ///
2671 /// @param[in] part_id
2672 /// The part id.
2673 ///
2674 /// @param[in] name
2675 /// Attribute name.
2676 ///
2677 /// @param[in] attr_info
2678 /// ::HAPI_AttributeInfo used as input for what tuple size.
2679 /// you want. Also contains some sanity checks like
2680 /// data type. Generally should be the same struct
2681 /// returned by ::HAPI_GetAttributeInfo().
2682 ///
2683 /// @param[in] stride
2684 /// Specifies how many items to skip over for each element.
2685 /// With a stride of -1, the stride will be set to
2686 /// @c attr_info->tuple_size. Otherwise, the stride will be
2687 /// set to the maximum of @c attr_info->tuple_size and
2688 /// @c stride.
2689 ///
2690 /// @param[out] data_array
2691 /// An 64-bit integer array at least the size of length.
2692 ///
2693 /// @param[in] start
2694 /// First index of range. Must be at least 0 and at
2695 /// most ::HAPI_AttributeInfo::count - 1.
2696 ///
2697 /// @param[in] length
2698 /// Must be at least 0 and at most
2699 /// ::HAPI_AttributeInfo::count - @p start.
2700 /// Note, if 0 is passed for length, the function will just
2701 /// do nothing and return ::HAPI_RESULT_SUCCESS.
2702 ///
2704  HAPI_AssetId asset_id,
2705  HAPI_ObjectId object_id,
2706  HAPI_GeoId geo_id,
2707  HAPI_PartId part_id,
2708  const char * name,
2709  HAPI_AttributeInfo * attr_info,
2710  int stride,
2711  HAPI_Int64 * data_array,
2712  int start, int length );
2713 
2714 /// @brief Get attribute float data.
2715 ///
2716 /// @param[in] session
2717 /// The session of Houdini you are interacting with.
2718 /// See @ref HAPI_Sessions for more on sessions.
2719 /// Pass NULL to just use the default in-process session.
2720 ///
2721 /// @param[in] asset_id
2722 /// The asset id.
2723 ///
2724 /// @param[in] object_id
2725 /// The object id.
2726 ///
2727 /// @param[in] geo_id
2728 /// The geometry id.
2729 ///
2730 /// @param[in] part_id
2731 /// The part id.
2732 ///
2733 /// @param[in] name
2734 /// Attribute name.
2735 ///
2736 /// @param[in] attr_info
2737 /// ::HAPI_AttributeInfo used as input for what tuple size.
2738 /// you want. Also contains some sanity checks like
2739 /// data type. Generally should be the same struct
2740 /// returned by ::HAPI_GetAttributeInfo().
2741 ///
2742 /// @param[out] data_array
2743 /// An float array at least the size of length.
2744 ///
2745 /// @param[in] start
2746 /// First index of range. Must be at least 0 and at
2747 /// most ::HAPI_AttributeInfo::count - 1.
2748 ///
2749 /// @param[in] length
2750 /// Must be at least 0 and at most
2751 /// ::HAPI_AttributeInfo::count - @p start.
2752 ///
2754  HAPI_AssetId asset_id,
2755  HAPI_ObjectId object_id,
2756  HAPI_GeoId geo_id,
2757  HAPI_PartId part_id,
2758  const char * name,
2759  HAPI_AttributeInfo * attr_info,
2760  float * data_array,
2761  int start, int length );
2762 
2763 /// @brief Get 64-bit attribute float data.
2764 ///
2765 /// @param[in] session
2766 /// The session of Houdini you are interacting with.
2767 /// See @ref HAPI_Sessions for more on sessions.
2768 /// Pass NULL to just use the default in-process session.
2769 ///
2770 /// @param[in] asset_id
2771 /// The asset id.
2772 ///
2773 /// @param[in] object_id
2774 /// The object id.
2775 ///
2776 /// @param[in] geo_id
2777 /// The geometry id.
2778 ///
2779 /// @param[in] part_id
2780 /// The part id.
2781 ///
2782 /// @param[in] name
2783 /// Attribute name.
2784 ///
2785 /// @param[in] attr_info
2786 /// ::HAPI_AttributeInfo used as input for what tuple size.
2787 /// you want. Also contains some sanity checks like
2788 /// data type. Generally should be the same struct
2789 /// returned by ::HAPI_GetAttributeInfo().
2790 ///
2791 /// @param[in] stride
2792 /// Specifies how many items to skip over for each element.
2793 /// With a stride of -1, the stride will be set to
2794 /// @c attr_info->tuple_size. Otherwise, the stride will be
2795 /// set to the maximum of @c attr_info->tuple_size and
2796 /// @c stride.
2797 ///
2798 /// @param[out] data_array
2799 /// An 64-bit float array at least the size of length.
2800 ///
2801 /// @param[in] start
2802 /// First index of range. Must be at least 0 and at
2803 /// most ::HAPI_AttributeInfo::count - 1.
2804 ///
2805 /// @param[in] length
2806 /// Must be at least 0 and at most
2807 /// ::HAPI_AttributeInfo::count - @p start.
2808 /// Note, if 0 is passed for length, the function will just
2809 /// do nothing and return ::HAPI_RESULT_SUCCESS.
2810 ///
2812  HAPI_AssetId asset_id,
2813  HAPI_ObjectId object_id,
2814  HAPI_GeoId geo_id,
2815  HAPI_PartId part_id,
2816  const char * name,
2817  HAPI_AttributeInfo * attr_info,
2818  int stride,
2819  double * data_array,
2820  int start, int length );
2821 
2822 /// @brief Get attribute string data. Note that the string handles
2823 /// returned are only valid until the next time this function
2824 /// is called.
2825 ///
2826 /// @param[in] session
2827 /// The session of Houdini you are interacting with.
2828 /// See @ref HAPI_Sessions for more on sessions.
2829 /// Pass NULL to just use the default in-process session.
2830 ///
2831 /// @param[in] asset_id
2832 /// The asset id.
2833 ///
2834 /// @param[in] object_id
2835 /// The object id.
2836 ///
2837 /// @param[in] geo_id
2838 /// The geometry id.
2839 ///
2840 /// @param[in] part_id
2841 /// The part id.
2842 ///
2843 /// @param[in] name
2844 /// Attribute name.
2845 ///
2846 /// @param[in] attr_info
2847 /// ::HAPI_AttributeInfo used as input for what tuple size.
2848 /// you want. Also contains some sanity checks like
2849 /// data type. Generally should be the same struct
2850 /// returned by ::HAPI_GetAttributeInfo().
2851 ///
2852 /// @param[out] data_array
2853 /// An int (string handles) array at least the
2854 /// size of length.
2855 ///
2856 /// @param[in] start
2857 /// First index of range. Must be at least 0 and at
2858 /// most ::HAPI_AttributeInfo::count - 1.
2859 ///
2860 /// @param[in] length
2861 /// Must be at least 0 and at most
2862 /// ::HAPI_AttributeInfo::count - @p start.
2863 ///
2865  HAPI_AssetId asset_id,
2866  HAPI_ObjectId object_id,
2867  HAPI_GeoId geo_id,
2868  HAPI_PartId part_id,
2869  const char * name,
2870  HAPI_AttributeInfo * attr_info,
2871  int * data_array,
2872  int start, int length );
2873 
2874 /// @brief Get group names for an entire geo. Please note that this
2875 /// function is NOT per-part, but it is per-geo. The companion
2876 /// function ::HAPI_GetGroupMembership() IS per-part. Also keep
2877 /// in mind that the name string handles are only
2878 /// valid until the next time this function is called.
2879 ///
2880 /// @param[in] session
2881 /// The session of Houdini you are interacting with.
2882 /// See @ref HAPI_Sessions for more on sessions.
2883 /// Pass NULL to just use the default in-process session.
2884 ///
2885 /// @param[in] asset_id
2886 /// The asset id.
2887 ///
2888 /// @param[in] object_id
2889 /// The object id.
2890 ///
2891 /// @param[in] geo_id
2892 /// The geometry id.
2893 ///
2894 /// @param[in] group_type
2895 /// The group type.
2896 ///
2897 /// @param[out] group_names_array
2898 /// The array of names to be filled. Should be the size
2899 /// given by ::HAPI_GeoInfo_GetGroupCountByType() with
2900 /// @p group_type and the ::HAPI_GeoInfo of @p geo_id.
2901 /// @note These string handles are only valid until the
2902 /// next call to ::HAPI_GetGroupNames().
2903 ///
2904 /// @param[in] group_count
2905 /// Sanity check. Should be less than or equal to the size
2906 /// of @p group_names.
2907 ///
2908 HAPI_DECL HAPI_GetGroupNames( const HAPI_Session * session,
2909  HAPI_AssetId asset_id,
2910  HAPI_ObjectId object_id,
2911  HAPI_GeoId geo_id,
2912  HAPI_GroupType group_type,
2913  HAPI_StringHandle * group_names_array,
2914  int group_count );
2915 
2916 /// @brief Get group membership.
2917 ///
2918 /// @param[in] session
2919 /// The session of Houdini you are interacting with.
2920 /// See @ref HAPI_Sessions for more on sessions.
2921 /// Pass NULL to just use the default in-process session.
2922 ///
2923 /// @param[in] asset_id
2924 /// The asset id.
2925 ///
2926 /// @param[in] object_id
2927 /// The object id.
2928 ///
2929 /// @param[in] geo_id
2930 /// The geometry id.
2931 ///
2932 /// @param[in] part_id
2933 /// The part id.
2934 ///
2935 /// @param[in] group_type
2936 /// The group type.
2937 ///
2938 /// @param[in] group_name
2939 /// The group name.
2940 ///
2941 /// @param[out] membership_array
2942 /// Array of ints that represent the membership of this
2943 /// group. Should be the size given by
2944 /// ::HAPI_PartInfo_GetElementCountByGroupType() with
2945 /// @p group_type and the ::HAPI_PartInfo of @p part_id.
2946 ///
2947 /// @param[in] start
2948 /// Start offset into the membership array. Must be
2949 /// less than ::HAPI_PartInfo_GetElementCountByGroupType().
2950 ///
2951 /// @param[in] length
2952 /// Should be less than or equal to the size
2953 /// of @p membership.
2954 ///
2956  HAPI_AssetId asset_id,
2957  HAPI_ObjectId object_id,
2958  HAPI_GeoId geo_id,
2959  HAPI_PartId part_id,
2960  HAPI_GroupType group_type,
2961  const char * group_name,
2962  int * membership_array,
2963  int start, int length );
2964 
2965 /// @brief Get the part ids that this instancer part is instancing.
2966 ///
2967 /// @param[in] session
2968 /// The session of Houdini you are interacting with.
2969 /// See @ref HAPI_Sessions for more on sessions.
2970 /// Pass NULL to just use the default in-process session.
2971 ///
2972 /// @param[in] asset_id
2973 /// The asset id.
2974 ///
2975 /// @param[in] object_id
2976 /// The object id.
2977 ///
2978 /// @param[in] geo_id
2979 /// The geometry id.
2980 ///
2981 /// @param[in] part_id
2982 /// The instancer part id.
2983 ///
2984 /// @param[out] instanced_parts_array
2985 /// Array of ::HAPI_PartId's to instance.
2986 ///
2987 /// @param[in] start
2988 /// Should be less than @p part_id's
2989 /// ::HAPI_PartInfo::instancedPartCount but more than or
2990 /// equal to 0.
2991 ///
2992 /// @param[in] length
2993 /// Should be less than @p part_id's
2994 /// ::HAPI_PartInfo::instancedPartCount - @p start.
2995 ///
2997  HAPI_AssetId asset_id,
2998  HAPI_ObjectId object_id,
2999  HAPI_GeoId geo_id,
3000  HAPI_PartId part_id,
3001  HAPI_PartId * instanced_parts_array,
3002  int start, int length );
3003 
3004 /// @brief Get the instancer part's list of transforms on which to
3005 /// instance the instanced parts you got from
3006 /// ::HAPI_GetInstancedPartIds().
3007 ///
3008 /// @param[in] session
3009 /// The session of Houdini you are interacting with.
3010 /// See @ref HAPI_Sessions for more on sessions.
3011 /// Pass NULL to just use the default in-process session.
3012 ///
3013 /// @param[in] asset_id
3014 /// The asset id.
3015 ///
3016 /// @param[in] object_id
3017 /// The object id.
3018 ///
3019 /// @param[in] geo_id
3020 /// The geometry id.
3021 ///
3022 /// @param[in] part_id
3023 /// The instancer part id.
3024 ///
3025 /// @param[in] rst_order
3026 /// The order of application of translation, rotation and
3027 /// scale.
3028 ///
3029 /// @param[out] transforms_array
3030 /// Array of ::HAPI_PartId's to instance.
3031 ///
3032 /// @param[in] start
3033 /// Should be less than @p part_id's
3034 /// ::HAPI_PartInfo::instanceCount but more than or
3035 /// equal to 0.
3036 ///
3037 /// @param[in] length
3038 /// Should be less than @p part_id's
3039 /// ::HAPI_PartInfo::instanceCount - @p start.
3040 ///
3042  HAPI_AssetId asset_id,
3043  HAPI_ObjectId object_id,
3044  HAPI_GeoId geo_id,
3045  HAPI_PartId part_id,
3046  HAPI_RSTOrder rst_order,
3047  HAPI_Transform * transforms_array,
3048  int start, int length );
3049 
3050 // GEOMETRY SETTERS ---------------------------------------------------------
3051 
3052 /// @brief Set the main geometry info struct (::HAPI_GeoInfo).
3053 /// TODO: This function does nothing at the moment. (Placeholder)
3054 ///
3055 /// @param[in] session
3056 /// The session of Houdini you are interacting with.
3057 /// See @ref HAPI_Sessions for more on sessions.
3058 /// Pass NULL to just use the default in-process session.
3059 ///
3060 /// @param[in] asset_id
3061 /// The asset id.
3062 ///
3063 /// @param[in] object_id
3064 /// The object id.
3065 ///
3066 /// @param[in] geo_id
3067 /// The geometry id.
3068 ///
3069 /// @param[in] geo_info
3070 /// ::HAPI_GeoInfo value.
3071 ///
3072 HAPI_DECL HAPI_SetGeoInfo( const HAPI_Session * session,
3073  HAPI_AssetId asset_id,
3074  HAPI_ObjectId object_id,
3075  HAPI_GeoId geo_id,
3076  HAPI_GeoInfo * geo_info );
3077 
3078 /// @brief Set the main part info struct (::HAPI_PartInfo).
3079 ///
3080 /// @param[in] session
3081 /// The session of Houdini you are interacting with.
3082 /// See @ref HAPI_Sessions for more on sessions.
3083 /// Pass NULL to just use the default in-process session.
3084 ///
3085 /// @param[in] asset_id
3086 /// The asset id.
3087 ///
3088 /// @param[in] object_id
3089 /// The object id.
3090 ///
3091 /// @param[in] geo_id
3092 /// The geometry id.
3093 ///
3094 /// @param[in] part_info
3095 /// ::HAPI_PartInfo value that describes the input
3096 /// geometry.
3097 ///
3098 HAPI_DECL HAPI_SetPartInfo( const HAPI_Session * session,
3099  HAPI_AssetId asset_id,
3100  HAPI_ObjectId object_id,
3101  HAPI_GeoId geo_id,
3102  const HAPI_PartInfo * part_info );
3103 
3104 /// @brief Set the array of faces where the nth integer in the array is
3105 /// the number of vertices the nth face has.
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] face_counts_array
3122 /// An integer array at least the size of @p length.
3123 ///
3124 /// @param[in] start
3125 /// First index of range. Must be at least 0 and at
3126 /// most ::HAPI_PartInfo::faceCount - 1.
3127 ///
3128 /// @param[in] length
3129 /// Must be at least 0 and at most
3130 /// ::HAPI_PartInfo::faceCount - @p start.
3131 ///
3132 HAPI_DECL HAPI_SetFaceCounts( const HAPI_Session * session,
3133  HAPI_AssetId asset_id,
3134  HAPI_ObjectId object_id,
3135  HAPI_GeoId geo_id,
3136  const int * face_counts_array,
3137  int start, int length );
3138 
3139 /// @brief Set array containing the vertex-point associations where the
3140 /// ith element in the array is the point index the ith vertex
3141 /// associates with.
3142 ///
3143 /// @param[in] session
3144 /// The session of Houdini you are interacting with.
3145 /// See @ref HAPI_Sessions for more on sessions.
3146 /// Pass NULL to just use the default in-process session.
3147 ///
3148 /// @param[in] asset_id
3149 /// The asset id.
3150 ///
3151 /// @param[in] object_id
3152 /// The object id.
3153 ///
3154 /// @param[in] geo_id
3155 /// The geometry id.
3156 ///
3157 /// @param[in] vertex_list_array
3158 /// An integer array at least the size of length.
3159 ///
3160 /// @param[in] start
3161 /// First index of range. Must be at least 0 and at
3162 /// most ::HAPI_PartInfo::vertexCount - 1.
3163 ///
3164 /// @param[in] length
3165 /// Must be at least 0 and at most
3166 /// ::HAPI_PartInfo::vertexCount - @p start.
3167 ///
3168 HAPI_DECL HAPI_SetVertexList( const HAPI_Session * session,
3169  HAPI_AssetId asset_id,
3170  HAPI_ObjectId object_id,
3171  HAPI_GeoId geo_id,
3172  const int * vertex_list_array,
3173  int start, int length );
3174 
3175 /// @brief Add an attribute.
3176 ///
3177 /// @param[in] session
3178 /// The session of Houdini you are interacting with.
3179 /// See @ref HAPI_Sessions for more on sessions.
3180 /// Pass NULL to just use the default in-process session.
3181 ///
3182 /// @param[in] asset_id
3183 /// The asset id.
3184 ///
3185 /// @param[in] object_id
3186 /// The object id.
3187 ///
3188 /// @param[in] geo_id
3189 /// The geometry id.
3190 ///
3191 /// @param[in] name
3192 /// Attribute name.
3193 ///
3194 /// @param[in] attr_info
3195 /// ::HAPI_AttributeInfo stores attribute properties.
3196 ///
3197 HAPI_DECL HAPI_AddAttribute( const HAPI_Session * session,
3198  HAPI_AssetId asset_id,
3199  HAPI_ObjectId object_id,
3200  HAPI_GeoId geo_id,
3201  const char * name,
3202  const HAPI_AttributeInfo * attr_info );
3203 
3204 /// @brief Set attribute integer data.
3205 ///
3206 /// @param[in] session
3207 /// The session of Houdini you are interacting with.
3208 /// See @ref HAPI_Sessions for more on sessions.
3209 /// Pass NULL to just use the default in-process session.
3210 ///
3211 /// @param[in] asset_id
3212 /// The asset id.
3213 ///
3214 /// @param[in] object_id
3215 /// The object id.
3216 ///
3217 /// @param[in] geo_id
3218 /// The geometry id.
3219 ///
3220 /// @param[in] name
3221 /// Attribute name.
3222 ///
3223 /// @param[in] attr_info
3224 /// ::HAPI_AttributeInfo used as input for what tuple size.
3225 /// you want. Also contains some sanity checks like
3226 /// data type. Generally should be the same struct
3227 /// returned by ::HAPI_GetAttributeInfo().
3228 ///
3229 /// @param[in] data_array
3230 /// An integer array at least the size of length.
3231 ///
3232 /// @param[in] start
3233 /// First index of range. Must be at least 0 and at
3234 /// most ::HAPI_AttributeInfo::count - 1.
3235 ///
3236 /// @param[in] length
3237 /// Must be at least 0 and at most
3238 /// ::HAPI_AttributeInfo::count - @p start.
3239 ///
3241  HAPI_AssetId asset_id,
3242  HAPI_ObjectId object_id,
3243  HAPI_GeoId geo_id,
3244  const char * name,
3245  const HAPI_AttributeInfo * attr_info,
3246  const int * data_array,
3247  int start, int length );
3248 
3249 /// @brief Set 64-bit attribute integer data.
3250 ///
3251 /// @param[in] session
3252 /// The session of Houdini you are interacting with.
3253 /// See @ref HAPI_Sessions for more on sessions.
3254 /// Pass NULL to just use the default in-process session.
3255 ///
3256 /// @param[in] asset_id
3257 /// The asset id.
3258 ///
3259 /// @param[in] object_id
3260 /// The object id.
3261 ///
3262 /// @param[in] geo_id
3263 /// The geometry id.
3264 ///
3265 /// @param[in] name
3266 /// Attribute name.
3267 ///
3268 /// @param[in] attr_info
3269 /// ::HAPI_AttributeInfo used as input for what tuple size.
3270 /// you want. Also contains some sanity checks like
3271 /// data type. Generally should be the same struct
3272 /// returned by ::HAPI_GetAttributeInfo().
3273 ///
3274 /// @param[in] data_array
3275 /// An 64-bit integer array at least the size of length.
3276 ///
3277 /// @param[in] start
3278 /// First index of range. Must be at least 0 and at
3279 /// most ::HAPI_AttributeInfo::count - 1.
3280 ///
3281 /// @param[in] length
3282 /// Must be at least 0 and at most
3283 /// ::HAPI_AttributeInfo::count - @p start.
3284 ///
3286  HAPI_AssetId asset_id,
3287  HAPI_ObjectId object_id,
3288  HAPI_GeoId geo_id,
3289  const char * name,
3290  const HAPI_AttributeInfo * attr_info,
3291  const HAPI_Int64 * data_array,
3292  int start, int length );
3293 
3294 /// @brief Set attribute float data.
3295 ///
3296 /// @param[in] session
3297 /// The session of Houdini you are interacting with.
3298 /// See @ref HAPI_Sessions for more on sessions.
3299 /// Pass NULL to just use the default in-process session.
3300 ///
3301 /// @param[in] asset_id
3302 /// The asset id.
3303 ///
3304 /// @param[in] object_id
3305 /// The object id.
3306 ///
3307 /// @param[in] geo_id
3308 /// The geometry id.
3309 ///
3310 /// @param[in] name
3311 /// Attribute name.
3312 ///
3313 /// @param[in] attr_info
3314 /// ::HAPI_AttributeInfo used as input for what tuple size.
3315 /// you want. Also contains some sanity checks like
3316 /// data type. Generally should be the same struct
3317 /// returned by ::HAPI_GetAttributeInfo().
3318 ///
3319 /// @param[in] data_array
3320 /// An float array at least the size of length.
3321 ///
3322 /// @param[in] start
3323 /// First index of range. Must be at least 0 and at
3324 /// most ::HAPI_AttributeInfo::count - 1.
3325 ///
3326 /// @param[in] length
3327 /// Must be at least 0 and at most
3328 /// ::HAPI_AttributeInfo::count - @p start.
3329 ///
3331  HAPI_AssetId asset_id,
3332  HAPI_ObjectId object_id,
3333  HAPI_GeoId geo_id,
3334  const char * name,
3335  const HAPI_AttributeInfo * attr_info,
3336  const float * data_array,
3337  int start, int length );
3338 
3339 /// @brief Set 64-bit attribute float data.
3340 ///
3341 /// @param[in] session
3342 /// The session of Houdini you are interacting with.
3343 /// See @ref HAPI_Sessions for more on sessions.
3344 /// Pass NULL to just use the default in-process session.
3345 ///
3346 /// @param[in] asset_id
3347 /// The asset id.
3348 ///
3349 /// @param[in] object_id
3350 /// The object id.
3351 ///
3352 /// @param[in] geo_id
3353 /// The geometry id.
3354 ///
3355 /// @param[in] name
3356 /// Attribute name.
3357 ///
3358 /// @param[in] attr_info
3359 /// ::HAPI_AttributeInfo used as input for what tuple size.
3360 /// you want. Also contains some sanity checks like
3361 /// data type. Generally should be the same struct
3362 /// returned by ::HAPI_GetAttributeInfo().
3363 ///
3364 /// @param[in] data_array
3365 /// An 64-bit float array at least the size of length.
3366 ///
3367 /// @param[in] start
3368 /// First index of range. Must be at least 0 and at
3369 /// most ::HAPI_AttributeInfo::count - 1.
3370 ///
3371 /// @param[in] length
3372 /// Must be at least 0 and at most
3373 /// ::HAPI_AttributeInfo::count - @p start.
3374 ///
3376  HAPI_AssetId asset_id,
3377  HAPI_ObjectId object_id,
3378  HAPI_GeoId geo_id,
3379  const char * name,
3380  const HAPI_AttributeInfo * attr_info,
3381  const double * data_array,
3382  int start, int length );
3383 
3384 /// @brief Set attribute string data.
3385 ///
3386 /// @param[in] session
3387 /// The session of Houdini you are interacting with.
3388 /// See @ref HAPI_Sessions for more on sessions.
3389 /// Pass NULL to just use the default in-process session.
3390 ///
3391 /// @param[in] asset_id
3392 /// The asset id.
3393 ///
3394 /// @param[in] object_id
3395 /// The object id.
3396 ///
3397 /// @param[in] geo_id
3398 /// The geometry id.
3399 ///
3400 /// @param[in] name
3401 /// Attribute name.
3402 ///
3403 /// @param[in] attr_info
3404 /// ::HAPI_AttributeInfo used as input for what tuple size.
3405 /// you want. Also contains some sanity checks like
3406 /// data type. Generally should be the same struct
3407 /// returned by ::HAPI_GetAttributeInfo().
3408 ///
3409 /// @param[in] data_array
3410 /// A strings array at least the size of length.
3411 ///
3412 /// @param[in] start
3413 /// First index of range. Must be at least 0 and at
3414 /// most ::HAPI_AttributeInfo::count - 1.
3415 ///
3416 /// @param[in] length
3417 /// Must be at least 0 and at most
3418 /// ::HAPI_AttributeInfo::count - @p start.
3419 ///
3421  HAPI_AssetId asset_id,
3422  HAPI_ObjectId object_id,
3423  HAPI_GeoId geo_id,
3424  const char * name,
3425  const HAPI_AttributeInfo *attr_info,
3426  const char ** data_array,
3427  int start, int length );
3428 
3429 /// @brief Add a group to the input geo with the given type and name.
3430 ///
3431 /// @param[in] session
3432 /// The session of Houdini you are interacting with.
3433 /// See @ref HAPI_Sessions for more on sessions.
3434 /// Pass NULL to just use the default in-process session.
3435 ///
3436 /// @param[in] asset_id
3437 /// The asset id.
3438 ///
3439 /// @param[in] object_id
3440 /// The object id.
3441 ///
3442 /// @param[in] geo_id
3443 /// The geometry id.
3444 ///
3445 /// @param[in] group_type
3446 /// The group type.
3447 ///
3448 /// @param[in] group_name
3449 /// Name of new group to be added.
3450 ///
3451 HAPI_DECL HAPI_AddGroup( const HAPI_Session * session,
3452  HAPI_AssetId asset_id,
3453  HAPI_ObjectId object_id,
3454  HAPI_GeoId geo_id,
3455  HAPI_GroupType group_type,
3456  const char * group_name );
3457 
3458 /// @brief Set group membership.
3459 ///
3460 /// @param[in] session
3461 /// The session of Houdini you are interacting with.
3462 /// See @ref HAPI_Sessions for more on sessions.
3463 /// Pass NULL to just use the default in-process session.
3464 ///
3465 /// @param[in] asset_id
3466 /// The asset id.
3467 ///
3468 /// @param[in] object_id
3469 /// The object id.
3470 ///
3471 /// @param[in] geo_id
3472 /// The geometry id.
3473 ///
3474 /// @param[in] group_type
3475 /// The group type.
3476 ///
3477 /// @param[in] group_name
3478 /// The group name.
3479 ///
3480 /// @param[in] membership_array
3481 /// Array of ints that represent the membership of this
3482 /// group. Should be the size given by
3483 /// ::HAPI_PartInfo_GetElementCountByGroupType() with
3484 /// @p group_type and the ::HAPI_PartInfo of @p part_id.
3485 ///
3486 /// @param[in] start
3487 /// Start offset into the membership array. Must be
3488 /// less than ::HAPI_PartInfo_GetElementCountByGroupType().
3489 ///
3490 /// @param[in] length
3491 /// Should be less than or equal to the size
3492 /// of @p membership.
3493 ///
3495  HAPI_AssetId asset_id,
3496  HAPI_ObjectId object_id,
3497  HAPI_GeoId geo_id,
3498  HAPI_GroupType group_type,
3499  const char * group_name,
3500  const int * membership_array,
3501  int start, int length );
3502 
3503 /// @brief Commit the current input geometry to the cook engine. Nodes
3504 /// that use this geometry node will re-cook using the input
3505 /// geometry given through the geometry setter API calls.
3506 ///
3507 /// @param[in] session
3508 /// The session of Houdini you are interacting with.
3509 /// See @ref HAPI_Sessions for more on sessions.
3510 /// Pass NULL to just use the default in-process session.
3511 ///
3512 /// @param[in] asset_id
3513 /// The asset id.
3514 ///
3515 /// @param[in] object_id
3516 /// The object id.
3517 ///
3518 /// @param[in] geo_id
3519 /// The geometry id.
3520 ///
3521 HAPI_DECL HAPI_CommitGeo( const HAPI_Session * session,
3522  HAPI_AssetId asset_id,
3523  HAPI_ObjectId object_id,
3524  HAPI_GeoId geo_id );
3525 
3526 /// @brief Remove all changes that have been committed to this
3527 /// geometry. Only applies to geometry nodes that are
3528 /// exposed edit nodes.
3529 ///
3530 /// @param[in] session
3531 /// The session of Houdini you are interacting with.
3532 /// See @ref HAPI_Sessions for more on sessions.
3533 /// Pass NULL to just use the default in-process session.
3534 ///
3535 /// @param[in] asset_id
3536 /// The asset id.
3537 ///
3538 /// @param[in] object_id
3539 /// The object id.
3540 ///
3541 /// @param[in] geo_id
3542 /// The geometry id.
3543 ///
3544 HAPI_DECL HAPI_RevertGeo( const HAPI_Session * session,
3545  HAPI_AssetId asset_id,
3546  HAPI_ObjectId object_id,
3547  HAPI_GeoId geo_id );
3548 
3549 // INTER-ASSET --------------------------------------------------------------
3550 
3551 /// @brief Connect the transform of two assets together.
3552 ///
3553 /// @param[in] session
3554 /// The session of Houdini you are interacting with.
3555 /// See @ref HAPI_Sessions for more on sessions.
3556 /// Pass NULL to just use the default in-process session.
3557 ///
3558 /// @param[in] asset_id_from
3559 /// The asset id of the source asset.
3560 ///
3561 /// @param[in] asset_id_to
3562 /// The asset id of the destination asset.
3563 ///
3564 /// @param[in] input_idx
3565 /// The index on the destination asset where the
3566 /// connection should be made.
3567 ///
3569  HAPI_AssetId asset_id_from,
3570  HAPI_AssetId asset_id_to,
3571  int input_idx );
3572 
3573 /// @brief Break an existing transform connection
3574 ///
3575 /// @param[in] session
3576 /// The session of Houdini you are interacting with.
3577 /// See @ref HAPI_Sessions for more on sessions.
3578 /// Pass NULL to just use the default in-process session.
3579 ///
3580 /// @param[in] asset_id
3581 /// The asset id of the asset.
3582 ///
3583 /// @param[in] input_idx
3584 /// The index on the asset where the connection
3585 /// should be broken.
3586 ///
3588  HAPI_AssetId asset_id,
3589  int input_idx );
3590 
3591 /// @brief Connect the geometry of two assets together. For
3592 /// example we can connect a particular piece of geometry from
3593 /// an object level asset to a sop level asset or even another
3594 /// object level asset. This method gives you the fine grained
3595 /// control over the exact piece of geometry to connect by
3596 /// allowing you to specify the exact object and group of the
3597 /// geometry you are trying to connect.
3598 ///
3599 /// @param[in] session
3600 /// The session of Houdini you are interacting with.
3601 /// See @ref HAPI_Sessions for more on sessions.
3602 /// Pass NULL to just use the default in-process session.
3603 ///
3604 /// @param[in] asset_id_from
3605 /// The asset id of the source asset.
3606 ///
3607 /// @param[in] object_id_from
3608 /// The object within the asset that contains the
3609 /// geometry to send.
3610 ///
3611 /// @param[in] asset_id_to
3612 /// The asset id of the destination asset.
3613 ///
3614 /// @param[in] input_idx
3615 /// The index on the destination asset where the
3616 /// connection should be made.
3617 ///
3619  HAPI_AssetId asset_id_from,
3620  HAPI_ObjectId object_id_from,
3621  HAPI_AssetId asset_id_to,
3622  int input_idx );
3623 
3624 /// @brief Break an existing geometry connection
3625 ///
3626 /// @param[in] session
3627 /// The session of Houdini you are interacting with.
3628 /// See @ref HAPI_Sessions for more on sessions.
3629 /// Pass NULL to just use the default in-process session.
3630 ///
3631 /// @param[in] asset_id
3632 /// The asset id of the asset.
3633 ///
3634 /// @param[in] input_idx
3635 /// The index on the asset where the connection
3636 /// should be broken.
3637 ///
3639  HAPI_AssetId asset_id,
3640  int input_idx );
3641 
3642 // MATERIALS ----------------------------------------------------------------
3643 
3644 /// @brief Get material ids by face/primitive. The material ids returned
3645 /// will be valid as long as the asset is alive. You should query
3646 /// this list after every cook to see if the material assignments
3647 /// have changed. You should also query each material individually
3648 /// using ::HAPI_GetMaterialInfo() to see if it is dirty and needs
3649 /// to be re-imported.
3650 ///
3651 /// @param[in] session
3652 /// The session of Houdini you are interacting with.
3653 /// See @ref HAPI_Sessions for more on sessions.
3654 /// Pass NULL to just use the default in-process session.
3655 ///
3656 /// @param[in] asset_id
3657 /// The asset id.
3658 ///
3659 /// @param[in] object_id
3660 /// The object id.
3661 ///
3662 /// @param[in] geo_id
3663 /// The geometry id.
3664 ///
3665 /// @param[in] part_id
3666 /// The part id.
3667 ///
3668 /// @param[out] are_all_the_same
3669 /// (optional) If true, all faces on this part have the
3670 /// same material assignment. You can pass NULL here.
3671 ///
3672 /// @param[out] material_ids_array
3673 /// An array of ::HAPI_MaterialId at least the size of
3674 /// @p length and at most the size of
3675 /// ::HAPI_PartInfo::faceCount.
3676 ///
3677 /// @param[in] start
3678 /// The starting index into the list of faces from which
3679 /// you wish to get the material ids from. Note that
3680 /// this should be less than ::HAPI_PartInfo::faceCount.
3681 ///
3682 /// @param[in] length
3683 /// The number of material ids you wish to get. Note that
3684 /// this should be at most:
3685 /// ::HAPI_PartInfo::faceCount - @p start.
3686 ///
3688  HAPI_AssetId asset_id,
3689  HAPI_ObjectId object_id,
3690  HAPI_GeoId geo_id,
3691  HAPI_PartId part_id,
3692  HAPI_Bool * are_all_the_same,
3693  HAPI_MaterialId * material_ids_array,
3694  int start, int length );
3695 
3696 /// @brief Get the material info.
3697 ///
3698 /// @param[in] session
3699 /// The session of Houdini you are interacting with.
3700 /// See @ref HAPI_Sessions for more on sessions.
3701 /// Pass NULL to just use the default in-process session.
3702 ///
3703 /// @param[in] asset_id
3704 /// The asset id.
3705 ///
3706 /// @param[in] material_id
3707 /// The material id as given from
3708 /// ::HAPI_GetMaterialIdsOnFaces().
3709 ///
3710 /// @param[out] material_info
3711 /// The returned material info.
3712 ///
3714  HAPI_AssetId asset_id,
3715  HAPI_MaterialId material_id,
3716  HAPI_MaterialInfo * material_info );
3717 
3718 /// @brief Get the material on a part.
3719 ///
3720 /// @param[in] session
3721 /// The session of Houdini you are interacting with.
3722 /// See @ref HAPI_Sessions for more on sessions.
3723 /// Pass NULL to just use the default in-process session.
3724 ///
3725 /// @param[in] asset_id
3726 /// The asset id.
3727 ///
3728 /// @param[in] object_id
3729 /// The object id.
3730 ///
3731 /// @param[in] geo_id
3732 /// The geometry id.
3733 ///
3734 /// @param[in] part_id
3735 /// The part id.
3736 ///
3737 /// @param[out] material_info
3738 /// The returned ::HAPI_MaterialInfo. If there is no
3739 /// material on this part the call will still succeed
3740 /// but the ::HAPI_MaterialInfo::exists will be set to
3741 /// false.
3742 ///
3744 HAPI_GetMaterialOnPart( const HAPI_Session * session,
3745  HAPI_AssetId asset_id,
3746  HAPI_ObjectId object_id,
3747  HAPI_GeoId geo_id,
3748  HAPI_PartId part_id,
3749  HAPI_MaterialInfo * material_info );
3750 
3751 /// @brief Get the material on a group. Use the
3752 /// ::HAPI_GetGroupMembership() call to determine where the
3753 /// material should be applied.
3754 ///
3755 /// @param[in] session
3756 /// The session of Houdini you are interacting with.
3757 /// See @ref HAPI_Sessions for more on sessions.
3758 /// Pass NULL to just use the default in-process session.
3759 ///
3760 /// @param[in] asset_id
3761 /// The asset id.
3762 ///
3763 /// @param[in] object_id
3764 /// The object id.
3765 ///
3766 /// @param[in] geo_id
3767 /// The geometry id.
3768 ///
3769 /// @param[in] group_name
3770 /// The group name.
3771 ///
3772 /// @param[out] material_info
3773 /// The returned ::HAPI_MaterialInfo. If there is no
3774 /// material on this group the call will still succeed
3775 /// but the ::HAPI_MaterialInfo::exists will be set to
3776 /// false.
3777 ///
3779 HAPI_GetMaterialOnGroup( const HAPI_Session * session,
3780  HAPI_AssetId asset_id,
3781  HAPI_ObjectId object_id,
3782  HAPI_GeoId geo_id,
3783  const char * group_name,
3784  HAPI_MaterialInfo * material_info );
3785 
3786 /// @brief Render only a single texture to an image for later extraction.
3787 /// An example use of this method might be to render the diffuse,
3788 /// normal, and bump texture maps of a material to individual
3789 /// texture files for use within the client application.
3790 ///
3791 /// Note that you must call this first for any of the other material
3792 /// APIs to work.
3793 ///
3794 /// @param[in] session
3795 /// The session of Houdini you are interacting with.
3796 /// See @ref HAPI_Sessions for more on sessions.
3797 /// Pass NULL to just use the default in-process session.
3798 ///
3799 /// @param[in] asset_id
3800 /// The asset id.
3801 ///
3802 /// @param[in] material_id
3803 /// The material id as given in ::HAPI_MaterialInfo.
3804 ///
3805 /// @param[in] parm_id
3806 /// This is the index in the parameter list of the
3807 /// material_id's node of the parameter containing the
3808 /// texture map file path.
3809 ///
3811  HAPI_AssetId asset_id,
3812  HAPI_MaterialId material_id,
3813  HAPI_ParmId parm_id );
3814 
3815 /// @brief Get the number of supported texture file formats.
3816 ///
3817 /// @param[in] session
3818 /// The session of Houdini you are interacting with.
3819 /// See @ref HAPI_Sessions for more on sessions.
3820 /// Pass NULL to just use the default in-process session.
3821 ///
3822 /// @param[out] file_format_count
3823 /// The number of supported texture file formats.
3824 ///
3826  int * file_format_count );
3827 
3828 /// @brief Get a list of support image file formats - their names,
3829 /// descriptions and a list of recognized extensions.
3830 ///
3831 /// Note that you MUST call
3832 /// ::HAPI_GetSupportedImageFileFormatCount()
3833 /// before calling this function for the first time.
3834 ///
3835 /// @param[in] session
3836 /// The session of Houdini you are interacting with.
3837 /// See @ref HAPI_Sessions for more on sessions.
3838 /// Pass NULL to just use the default in-process session.
3839 ///
3840 /// @param[out] formats_array
3841 /// The list of ::HAPI_ImageFileFormat structs to
3842 /// be filled.
3843 ///
3844 /// @param[in] file_format_count
3845 /// The number of supported texture file formats. This
3846 /// should be at least as large as the count returned
3847 /// by ::HAPI_GetSupportedImageFileFormatCount().
3848 ///
3850  const HAPI_Session * session,
3851  HAPI_ImageFileFormat * formats_array,
3852  int file_format_count );
3853 
3854 /// @brief Get information about the image that was just rendered, like
3855 /// resolution and default file format. This information will be
3856 /// used when extracting planes to an image.
3857 ///
3858 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3859 /// this method call to make sense.
3860 ///
3861 /// @param[in] session
3862 /// The session of Houdini you are interacting with.
3863 /// See @ref HAPI_Sessions for more on sessions.
3864 /// Pass NULL to just use the default in-process session.
3865 ///
3866 /// @param[in] asset_id
3867 /// The asset id.
3868 ///
3869 /// @param[in] material_id
3870 /// The material id as given in ::HAPI_MaterialInfo.
3871 ///
3872 /// @param[out] image_info
3873 /// The struct containing the image information.
3874 ///
3875 HAPI_DECL HAPI_GetImageInfo( const HAPI_Session * session,
3876  HAPI_AssetId asset_id,
3877  HAPI_MaterialId material_id,
3878  HAPI_ImageInfo * image_info );
3879 
3880 /// @brief Set image information like resolution and file format.
3881 /// This information will be used when extracting planes to
3882 /// an image.
3883 ///
3884 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3885 /// this method call to make sense.
3886 ///
3887 /// You should also first call ::HAPI_GetImageInfo() to get the
3888 /// current Image Info and change only the properties
3889 /// you don't like.
3890 ///
3891 /// @param[in] session
3892 /// The session of Houdini you are interacting with.
3893 /// See @ref HAPI_Sessions for more on sessions.
3894 /// Pass NULL to just use the default in-process session.
3895 ///
3896 /// @param[in] asset_id
3897 /// The asset id.
3898 ///
3899 /// @param[in] material_id
3900 /// The material id as given in ::HAPI_MaterialInfo.
3901 ///
3902 /// @param[in] image_info
3903 /// The struct containing the new image information.
3904 ///
3905 HAPI_DECL HAPI_SetImageInfo( const HAPI_Session * session,
3906  HAPI_AssetId asset_id,
3907  HAPI_MaterialId material_id,
3908  const HAPI_ImageInfo * image_info );
3909 
3910 /// @brief Get the number of image planes for the just rendered image.
3911 ///
3912 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3913 /// this method call to make sense.
3914 ///
3915 /// @param[in] session
3916 /// The session of Houdini you are interacting with.
3917 /// See @ref HAPI_Sessions for more on sessions.
3918 /// Pass NULL to just use the default in-process session.
3919 ///
3920 /// @param[in] asset_id
3921 /// The asset id.
3922 ///
3923 /// @param[in] material_id
3924 /// The material id as given in ::HAPI_MaterialInfo.
3925 ///
3926 /// @param[out] image_plane_count
3927 /// The number of image planes.
3928 ///
3930  HAPI_AssetId asset_id,
3931  HAPI_MaterialId material_id,
3932  int * image_plane_count );
3933 
3934 /// @brief Get the names of the image planes of the just rendered image.
3935 ///
3936 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3937 /// this method call to make sense.
3938 ///
3939 /// You should also call ::HAPI_GetImagePlaneCount() first to get
3940 /// the total number of image planes so you know how large the
3941 /// image_planes string handle array should be.
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_planes_array
3955 /// The image plane names.
3956 ///
3957 /// @param[in] image_plane_count
3958 /// The number of image planes to get names for. This
3959 /// must be less than or equal to the count returned
3960 /// by ::HAPI_GetImagePlaneCount().
3961 ///
3962 HAPI_DECL HAPI_GetImagePlanes( const HAPI_Session * session,
3963  HAPI_AssetId asset_id,
3964  HAPI_MaterialId material_id,
3965  HAPI_StringHandle * image_planes_array,
3966  int image_plane_count );
3967 
3968 /// @brief Extract a rendered image to a file.
3969 ///
3970 /// Note that you must call ::HAPI_RenderTextureToImage() first for
3971 /// this method call to make sense.
3972 ///
3973 /// @param[in] session
3974 /// The session of Houdini you are interacting with.
3975 /// See @ref HAPI_Sessions for more on sessions.
3976 /// Pass NULL to just use the default in-process session.
3977 ///
3978 /// @param[in] asset_id
3979 /// The asset id.
3980 ///
3981 /// @param[in] material_id
3982 /// The material id as given in ::HAPI_MaterialInfo.
3983 ///
3984 /// @param[in] image_file_format_name
3985 /// The image file format name you wish the image to be
3986 /// extracted as. You can leave this parameter NULL to
3987 /// get the image in the original format if it comes from
3988 /// another texture file or in the default HAPI format,
3989 /// which is ::HAPI_DEFAULT_IMAGE_FORMAT_NAME, if the image
3990 /// is generated.
3991 ///
3992 /// You can get some of the very common standard image
3993 /// file format names from HAPI_Common.h under the
3994 /// "Defines" section.
3995 ///
3996 /// You can also get a list of all supported file formats
3997 /// (and the exact names this parameter expects)
3998 /// by using ::HAPI_GetSupportedImageFileFormats(). This
3999 /// list will include custom file formats you created via
4000 /// custom DSOs (see HDK docs about IMG_Format). You will
4001 /// get back a list of ::HAPI_ImageFileFormat. This
4002 /// parameter expects the ::HAPI_ImageFileFormat::nameSH
4003 /// of a given image file format.
4004 ///
4005 /// @param[in] image_planes
4006 /// The image planes you wish to extract into the file.
4007 /// Multiple image planes should be separated by spaces.
4008 ///
4009 /// @param[in] destination_folder_path
4010 /// The folder where the image file should be created.
4011 ///
4012 /// @param[in] destination_file_name
4013 /// Optional parameter to overwrite the name of the
4014 /// extracted texture file. This should NOT include
4015 /// the extension as the file type will be decided
4016 /// by the ::HAPI_ImageInfo you can set using
4017 /// ::HAPI_SetImageInfo(). You still have to use
4018 /// destination_file_path to get the final file path.
4019 ///
4020 /// Pass in NULL to have the file name be automatically
4021 /// generated from the name of the material SHOP node,
4022 /// the name of the texture map parameter if the
4023 /// image was rendered from a texture, and the image
4024 /// plane names specified.
4025 ///
4026 /// @param[out] destination_file_path
4027 /// The full path string handle, including the
4028 /// destination_folder_path and the texture file name,
4029 /// to the extracted file. Note that this string handle
4030 /// will only be valid until the next call to
4031 /// this function.
4032 ///
4034  HAPI_AssetId asset_id,
4035  HAPI_MaterialId material_id,
4036  const char * image_file_format_name,
4037  const char * image_planes,
4038  const char * destination_folder_path,
4039  const char * destination_file_name,
4040  int * destination_file_path );
4041 
4042 /// @brief Extract a rendered image to memory.
4043 ///
4044 /// Note that you must call ::HAPI_RenderTextureToImage() first for
4045 /// this method call to make sense.
4046 ///
4047 /// Also note that this function will do all the work of
4048 /// extracting and composoting the image into a memory buffer
4049 /// but will not return to you that buffer, only its size. Use
4050 /// the returned size to allocated a sufficiently large buffer
4051 /// and call ::HAPI_GetImageMemoryBuffer() to fill your buffer
4052 /// with the just extracted image.
4053 ///
4054 /// @param[in] session
4055 /// The session of Houdini you are interacting with.
4056 /// See @ref HAPI_Sessions for more on sessions.
4057 /// Pass NULL to just use the default in-process session.
4058 ///
4059 /// @param[in] asset_id
4060 /// The asset id.
4061 ///
4062 /// @param[in] material_id
4063 /// The material id as given in ::HAPI_MaterialInfo.
4064 ///
4065 /// @param[in] image_file_format_name
4066 /// The image file format name you wish the image to be
4067 /// extracted as. You can leave this parameter NULL to
4068 /// get the image in the original format if it comes from
4069 /// another texture file or in the default HAPI format,
4070 /// which is ::HAPI_DEFAULT_IMAGE_FORMAT_NAME, if the image
4071 /// is generated.
4072 ///
4073 /// You can get some of the very common standard image
4074 /// file format names from HAPI_Common.h under the
4075 /// "Defines" section.
4076 ///
4077 /// You can also get a list of all supported file formats
4078 /// (and the exact names this parameter expects)
4079 /// by using ::HAPI_GetSupportedImageFileFormats(). This
4080 /// list will include custom file formats you created via
4081 /// custom DSOs (see HDK docs about IMG_Format). You will
4082 /// get back a list of ::HAPI_ImageFileFormat. This
4083 /// parameter expects the ::HAPI_ImageFileFormat::nameSH
4084 /// of a given image file format.
4085 ///
4086 /// @param[in] image_planes
4087 /// The image planes you wish to extract into the file.
4088 /// Multiple image planes should be separated by spaces.
4089 ///
4090 /// @param[out] buffer_size
4091 /// The extraction will be done to an internal buffer
4092 /// who's size you get via this parameter. Use the
4093 /// returned buffer_size when calling
4094 /// ::HAPI_GetImageMemoryBuffer() to get the image
4095 /// buffer you just extracted.
4096 ///
4098  HAPI_AssetId asset_id,
4099  HAPI_MaterialId material_id,
4100  const char * image_file_format_name,
4101  const char * image_planes,
4102  int * buffer_size );
4103 
4104 /// @brief Fill your allocated buffer with the just extracted
4105 /// image buffer.
4106 ///
4107 /// Note that you must call ::HAPI_RenderTextureToImage() first for
4108 /// this method call to make sense.
4109 ///
4110 /// Also note that you must call ::HAPI_ExtractImageToMemory()
4111 /// first in order to perform the extraction and get the
4112 /// extracted image buffer size that you need to know how much
4113 /// memory to allocated to fit your extracted image.
4114 ///
4115 /// @param[in] session
4116 /// The session of Houdini you are interacting with.
4117 /// See @ref HAPI_Sessions for more on sessions.
4118 /// Pass NULL to just use the default in-process session.
4119 ///
4120 /// @param[in] asset_id
4121 /// The asset id.
4122 ///
4123 /// @param[in] material_id
4124 /// The material id as given in ::HAPI_MaterialInfo.
4125 ///
4126 /// @param[out] buffer
4127 /// The buffer passed in here will be filled with the
4128 /// image buffer created during the call to
4129 /// ::HAPI_ExtractImageToMemory().
4130 ///
4131 /// @param[in] length
4132 /// Sanity check. This size should be the same as the
4133 /// size allocated for the buffer passed in and should
4134 /// be at least as large as the buffer_size returned by
4135 /// the call to ::HAPI_ExtractImageToMemory().
4136 ///
4138  HAPI_AssetId asset_id,
4139  HAPI_MaterialId material_id,
4140  char * buffer, int length );
4141 
4142 // SIMULATION/ANIMATION -----------------------------------------------------
4143 
4144 /// @brief Set an animation curve on a parameter of an exposed node.
4145 ///
4146 /// @param[in] session
4147 /// The session of Houdini you are interacting with.
4148 /// See @ref HAPI_Sessions for more on sessions.
4149 /// Pass NULL to just use the default in-process session.
4150 ///
4151 /// @param[in] node_id
4152 /// The exposed node id.
4153 ///
4154 /// @param[in] parm_id
4155 /// The id of an exposed parameter within the node.
4156 /// @param[in] parm_index
4157 /// The index of the parameter, if it is for example
4158 /// a 3 tuple
4159 ///
4160 /// @param[in] curve_keyframes_array
4161 /// An array of ::HAPI_Keyframe structs that describes
4162 /// the keys on this curve.
4163 ///
4164 /// @param[in] keyframe_count
4165 /// The number of keys on the curve.
4166 ///
4167 HAPI_DECL HAPI_SetAnimCurve( const HAPI_Session * session,
4168  HAPI_NodeId node_id, HAPI_ParmId parm_id,
4169  int parm_index,
4170  const HAPI_Keyframe * curve_keyframes_array,
4171  int keyframe_count );
4172 
4173 /// @brief A specialized convenience function to set the T,R,S values
4174 /// on an exposed node.
4175 ///
4176 /// @param[in] session
4177 /// The session of Houdini you are interacting with.
4178 /// See @ref HAPI_Sessions for more on sessions.
4179 /// Pass NULL to just use the default in-process session.
4180 ///
4181 /// @param[in] node_id
4182 /// The exposed node id.
4183 ///
4184 /// @param[in] trans_comp
4185 /// A value of ::HAPI_TransformComponent that
4186 /// identifies the particular comopnent of the
4187 /// transform to attach the curve to, for example
4188 /// ::HAPI_TRANSFORM_TX.
4189 ///
4190 /// @param[in] curve_keyframes_array
4191 /// An array of ::HAPI_Keyframe structs that describes
4192 /// the keys on this curve.
4193 ///
4194 /// @param[in] keyframe_count
4195 /// The number of keys on the curve.
4196 ///
4198  const HAPI_Session * session,
4199  HAPI_NodeId node_id,
4200  HAPI_TransformComponent trans_comp,
4201  const HAPI_Keyframe * curve_keyframes_array,
4202  int keyframe_count );
4203 
4204 /// @brief Resets the simulation cache of the asset. This is very useful
4205 /// for assets that use dynamics, to be called after some
4206 /// setup has changed for the asset - for example, asset inputs
4207 ///
4208 /// @param[in] session
4209 /// The session of Houdini you are interacting with.
4210 /// See @ref HAPI_Sessions for more on sessions.
4211 /// Pass NULL to just use the default in-process session.
4212 ///
4213 /// @param[in] asset_id
4214 /// The asset id.
4215 ///
4217  HAPI_AssetId asset_id );
4218 
4219 // VOLUMES ------------------------------------------------------------------
4220 
4221 /// @brief Retrieve any meta-data about the volume primitive, including
4222 /// its transform, location, scale, taper, resolution.
4223 ///
4224 /// @param[in] session
4225 /// The session of Houdini you are interacting with.
4226 /// See @ref HAPI_Sessions for more on sessions.
4227 /// Pass NULL to just use the default in-process session.
4228 ///
4229 /// @param[in] asset_id
4230 /// The asset id.
4231 ///
4232 /// @param[in] object_id
4233 /// The object id.
4234 ///
4235 /// @param[in] geo_id
4236 /// The geometry id.
4237 ///
4238 /// @param[in] part_id
4239 /// The part id.
4240 ///
4241 /// @param[out] volume_info
4242 /// The meta-data associated with the volume on the
4243 /// part specified by the previous parameters.
4244 ///
4245 HAPI_DECL HAPI_GetVolumeInfo( const HAPI_Session * session,
4246  HAPI_AssetId asset_id,
4247  HAPI_ObjectId object_id,
4248  HAPI_GeoId geo_id,
4249  HAPI_PartId part_id,
4250  HAPI_VolumeInfo * volume_info );
4251 
4252 /// @brief Iterate through a volume based on 8x8x8 sections of the volume
4253 /// Start iterating through the value of the volume at part_id.
4254 ///
4255 /// @param[in] session
4256 /// The session of Houdini you are interacting with.
4257 /// See @ref HAPI_Sessions for more on sessions.
4258 /// Pass NULL to just use the default in-process session.
4259 ///
4260 /// @param[in] asset_id
4261 /// The asset id.
4262 ///
4263 /// @param[in] object_id
4264 /// The object id.
4265 ///
4266 /// @param[in] geo_id
4267 /// The geometry id.
4268 ///
4269 /// @param[in] part_id
4270 /// The part id.
4271 ///
4272 /// @param[out] tile
4273 /// The tile info referring to the first tile in the
4274 /// volume at part_id.
4275 ///
4277  HAPI_AssetId asset_id,
4278  HAPI_ObjectId object_id,
4279  HAPI_GeoId geo_id,
4280  HAPI_PartId part_id,
4281  HAPI_VolumeTileInfo * tile );
4282 
4283 /// @brief Iterate through a volume based on 8x8x8 sections of the volume
4284 /// Continue iterating through the value of the volume at part_id.
4285 ///
4286 /// @param[in] session
4287 /// The session of Houdini you are interacting with.
4288 /// See @ref HAPI_Sessions for more on sessions.
4289 /// Pass NULL to just use the default in-process session.
4290 ///
4291 /// @param[in] asset_id
4292 /// The asset id.
4293 ///
4294 /// @param[in] object_id
4295 /// The object id.
4296 ///
4297 /// @param[in] geo_id
4298 /// The geometry id.
4299 ///
4300 /// @param[in] part_id
4301 /// The part id.
4302 ///
4303 /// @param[out] tile
4304 /// The tile info referring to the next tile in the
4305 /// set of tiles associated with the volume at this part.
4306 ///
4308  HAPI_AssetId asset_id,
4309  HAPI_ObjectId object_id,
4310  HAPI_GeoId geo_id,
4311  HAPI_PartId part_id,
4312  HAPI_VolumeTileInfo * tile );
4313 
4314 /// @brief Retrieve floating point values of the voxel at a specific
4315 /// index. Note that you must call ::HAPI_GetVolumeInfo() prior
4316 /// to this call.
4317 ///
4318 /// @param[in] session
4319 /// The session of Houdini you are interacting with.
4320 /// See @ref HAPI_Sessions for more on sessions.
4321 /// Pass NULL to just use the default in-process session.
4322 ///
4323 /// @param[in] asset_id
4324 /// The asset id.
4325 ///
4326 /// @param[in] object_id
4327 /// The object id.
4328 ///
4329 /// @param[in] geo_id
4330 /// The geometry id.
4331 ///
4332 /// @param[in] part_id
4333 /// The part id.
4334 ///
4335 /// @param[in] x_index
4336 /// The x index/coordinate of the voxel.
4337 ///
4338 /// @param[in] y_index
4339 /// The y index/coordinate of the voxel.
4340 ///
4341 /// @param[in] z_index
4342 /// The z index/coordinate of the voxel.
4343 ///
4344 /// @param[out] values_array
4345 /// The values of the voxel.
4346 ///
4347 /// @param[in] value_count
4348 /// Should be equal to the volume's
4349 /// ::HAPI_VolumeInfo::tupleSize.
4350 ///
4352  HAPI_AssetId asset_id,
4353  HAPI_ObjectId object_id,
4354  HAPI_GeoId geo_id,
4355  HAPI_PartId part_id,
4356  int x_index,
4357  int y_index,
4358  int z_index,
4359  float * values_array,
4360  int value_count );
4361 
4362 /// @brief Retrieve floating point values of the voxels pointed to
4363 /// by a tile. Note that a tile may extend beyond the limits
4364 /// of the volume so not all values in the given buffer will
4365 /// be written to. Voxels outside the volume will be initialized
4366 /// to the given fill value.
4367 ///
4368 /// @param[in] session
4369 /// The session of Houdini you are interacting with.
4370 /// See @ref HAPI_Sessions for more on sessions.
4371 /// Pass NULL to just use the default in-process session.
4372 ///
4373 /// @param[in] asset_id
4374 /// The asset id.
4375 ///
4376 /// @param[in] object_id
4377 /// The object id.
4378 ///
4379 /// @param[in] geo_id
4380 /// The geometry id.
4381 ///
4382 /// @param[in] part_id
4383 /// The part id.
4384 ///
4385 /// @param[in] fill_value
4386 /// Value that will be used to fill the @p values_array.
4387 /// This is useful so that you can see what values
4388 /// have actually been written to.
4389 ///
4390 /// @param[in] tile
4391 /// The tile to retrieve.
4392 ///
4393 /// @param[out] values_array
4394 /// The values of the tile.
4395 ///
4396 /// @param[in] length
4397 /// The length should be ( 8 ^ 3 ) * tupleSize.
4398 ///
4400  HAPI_AssetId asset_id,
4401  HAPI_ObjectId object_id,
4402  HAPI_GeoId geo_id,
4403  HAPI_PartId part_id,
4404  float fill_value,
4405  const HAPI_VolumeTileInfo * tile,
4406  float * values_array,
4407  int length );
4408 
4409 /// @brief Retrieve integer point values of the voxel at a specific
4410 /// index. Note that you must call ::HAPI_GetVolumeInfo() prior
4411 /// to this call.
4412 ///
4413 /// @param[in] session
4414 /// The session of Houdini you are interacting with.
4415 /// See @ref HAPI_Sessions for more on sessions.
4416 /// Pass NULL to just use the default in-process session.
4417 ///
4418 /// @param[in] asset_id
4419 /// The asset id.
4420 ///
4421 /// @param[in] object_id
4422 /// The object id.
4423 ///
4424 /// @param[in] geo_id
4425 /// The geometry id.
4426 ///
4427 /// @param[in] part_id
4428 /// The part id.
4429 ///
4430 /// @param[in] x_index
4431 /// The x index/coordinate of the voxel.
4432 ///
4433 /// @param[in] y_index
4434 /// The y index/coordinate of the voxel.
4435 ///
4436 /// @param[in] z_index
4437 /// The z index/coordinate of the voxel.
4438 ///
4439 /// @param[out] values_array
4440 /// The values of the voxel.
4441 ///
4442 /// @param[in] value_count
4443 /// Should be equal to the volume's
4444 /// ::HAPI_VolumeInfo::tupleSize.
4445 ///
4447  HAPI_AssetId asset_id,
4448  HAPI_ObjectId object_id,
4449  HAPI_GeoId geo_id,
4450  HAPI_PartId part_id,
4451  int x_index,
4452  int y_index,
4453  int z_index,
4454  int * values_array,
4455  int value_count );
4456 
4457 /// @brief Retrieve integer point values of the voxels pointed to
4458 /// by a tile. Note that a tile may extend beyond the limits
4459 /// of the volume so not all values in the given buffer will
4460 /// be written to. Voxels outside the volume will be initialized
4461 /// to the given fill value.
4462 ///
4463 /// @param[in] session
4464 /// The session of Houdini you are interacting with.
4465 /// See @ref HAPI_Sessions for more on sessions.
4466 /// Pass NULL to just use the default in-process session.
4467 ///
4468 /// @param[in] asset_id
4469 /// The asset id.
4470 ///
4471 /// @param[in] object_id
4472 /// The object id.
4473 ///
4474 /// @param[in] geo_id
4475 /// The geometry id.
4476 ///
4477 /// @param[in] part_id
4478 /// The part id.
4479 ///
4480 /// @param[in] fill_value
4481 /// Value that will be used to fill the @p values_array.
4482 /// This is useful so that you can see what values
4483 /// have actually been written to.
4484 ///
4485 /// @param[in] tile
4486 /// The tile to retrieve.
4487 ///
4488 /// @param[out] values_array
4489 /// The values of the tile.
4490 ///
4491 /// @param[in] length
4492 /// The length should be ( 8 ^ 3 ) * tupleSize.
4493 ///
4495  HAPI_AssetId asset_id,
4496  HAPI_ObjectId object_id,
4497  HAPI_GeoId geo_id,
4498  HAPI_PartId part_id,
4499  int fill_value,
4500  const HAPI_VolumeTileInfo * tile,
4501  int * values_array,
4502  int length );
4503 
4504 /// @brief Set the volume info of a geo on a geo input.
4505 ///
4506 /// @param[in] session
4507 /// The session of Houdini you are interacting with.
4508 /// See @ref HAPI_Sessions for more on sessions.
4509 /// Pass NULL to just use the default in-process session.
4510 ///
4511 /// @param[in] asset_id
4512 /// An asset that this volume will be input into.
4513 ///
4514 /// @param[in] object_id
4515 /// The object id.
4516 ///
4517 /// @param[in] geo_id
4518 /// The geometry id.
4519 ///
4520 /// @param[in] volume_info
4521 /// All volume information that can be specified per
4522 /// volume. This includes the position, orientation, scale,
4523 /// data format, tuple size, and taper. The tile size is
4524 /// always 8x8x8.
4525 ///
4526 HAPI_DECL HAPI_SetVolumeInfo( const HAPI_Session * session,
4527  HAPI_AssetId asset_id,
4528  HAPI_ObjectId object_id,
4529  HAPI_GeoId geo_id,
4530  const HAPI_VolumeInfo * volume_info );
4531 
4532 /// @brief Set the values of a float tile: this is an 8x8x8 subsection of
4533 /// the volume.
4534 ///
4535 /// @param[in] session
4536 /// The session of Houdini you are interacting with.
4537 /// See @ref HAPI_Sessions for more on sessions.
4538 /// Pass NULL to just use the default in-process session.
4539 ///
4540 /// @param[in] asset_id
4541 /// The asset that the volume will be input into.
4542 ///
4543 /// @param[in] object_id
4544 /// The object id.
4545 ///
4546 /// @param[in] geo_id
4547 /// The geometry id.
4548 ///
4549 /// @param[in] tile
4550 /// The tile that the volume will be input into.
4551 ///
4552 /// @param[in] values_array
4553 /// The values of the individual voxel tiles in the
4554 /// volume. The length of this array should
4555 /// be ( 8 ^ 3 ) * tupleSize.
4556 ///
4557 /// @param[in] length
4558 /// The length should be ( 8 ^ 3 ) * tupleSize.
4559 ///
4561  HAPI_AssetId asset_id,
4562  HAPI_ObjectId object_id,
4563  HAPI_GeoId geo_id,
4564  const HAPI_VolumeTileInfo * tile,
4565  const float * values_array,
4566  int length );
4567 
4568 /// @brief Set the values of an int tile: this is an 8x8x8 subsection of
4569 /// the volume.
4570 ///
4571 /// @param[in] session
4572 /// The session of Houdini you are interacting with.
4573 /// See @ref HAPI_Sessions for more on sessions.
4574 /// Pass NULL to just use the default in-process session.
4575 ///
4576 /// @param[in] asset_id
4577 /// The asset that the volume will be input into.
4578 ///
4579 /// @param[in] object_id
4580 /// The object id.
4581 ///
4582 /// @param[in] geo_id
4583 /// The geometry id.
4584 ///
4585 /// @param[in] tile
4586 /// The tile that the volume will be input into.
4587 ///
4588 /// @param[in] values_array
4589 /// The values of the individual voxel tiles in the
4590 /// volume. The length of this array should
4591 /// be ( 8 ^ 3 ) * tupleSize.
4592 ///
4593 /// @param[in] length
4594 /// The length should be ( 8 ^ 3 ) * tupleSize.
4595 ///
4597  HAPI_AssetId asset_id,
4598  HAPI_ObjectId object_id,
4599  HAPI_GeoId geo_id,
4600  const HAPI_VolumeTileInfo * tile,
4601  const int * values_array,
4602  int length );
4603 
4604 // CURVES -------------------------------------------------------------------
4605 
4606 /// @brief Retrieve any meta-data about the curves, including the
4607 /// curve's type, order, and periodicity.
4608 ///
4609 /// @param[in] session
4610 /// The session of Houdini you are interacting with.
4611 /// See @ref HAPI_Sessions for more on sessions.
4612 /// Pass NULL to just use the default in-process session.
4613 ///
4614 /// @param[in] asset_id
4615 /// The asset id.
4616 ///
4617 /// @param[in] object_id
4618 /// The object id.
4619 ///
4620 /// @param[in] geo_id
4621 /// The geometry id.
4622 ///
4623 /// @param[in] part_id
4624 /// The part id.
4625 ///
4626 /// @param[out] info
4627 /// The curve info represents the meta-data about
4628 /// the curves, including the type, order,
4629 /// and periodicity.
4630 ///
4631 HAPI_DECL HAPI_GetCurveInfo( const HAPI_Session * session,
4632  HAPI_AssetId asset_id,
4633  HAPI_ObjectId object_id,
4634  HAPI_GeoId geo_id,
4635  HAPI_PartId part_id,
4636  HAPI_CurveInfo * info );
4637 
4638 /// @brief Retrieve the number of vertices for each curve in the part.
4639 ///
4640 /// @param[in] session
4641 /// The session of Houdini you are interacting with.
4642 /// See @ref HAPI_Sessions for more on sessions.
4643 /// Pass NULL to just use the default in-process session.
4644 ///
4645 /// @param[in] asset_id
4646 /// The asset id.
4647 ///
4648 /// @param[in] object_id
4649 /// The object id.
4650 ///
4651 /// @param[in] geo_id
4652 /// The geometry id.
4653 ///
4654 /// @param[in] part_id
4655 /// The part id.
4656 ///
4657 /// @param[out] counts_array
4658 /// The number of cvs each curve contains
4659 ///
4660 /// @param[in] start
4661 /// The index of the first curve.
4662 ///
4663 /// @param[in] length
4664 /// The number of curves' counts to retrieve.
4665 ///
4666 HAPI_DECL HAPI_GetCurveCounts( const HAPI_Session * session,
4667  HAPI_AssetId asset_id,
4668  HAPI_ObjectId object_id,
4669  HAPI_GeoId geo_id,
4670  HAPI_PartId part_id,
4671  int * counts_array,
4672  int start, int length );
4673 
4674 /// @brief Retrieve the orders for each curve in the part if the
4675 /// curve has varying order.
4676 ///
4677 /// @param[in] session
4678 /// The session of Houdini you are interacting with.
4679 /// See @ref HAPI_Sessions for more on sessions.
4680 /// Pass NULL to just use the default in-process session.
4681 ///
4682 /// @param[in] asset_id
4683 /// The asset id.
4684 ///
4685 /// @param[in] object_id
4686 /// The object id.
4687 ///
4688 /// @param[in] geo_id
4689 /// The geometry id.
4690 ///
4691 /// @param[in] part_id
4692 /// The part id.
4693 ///
4694 /// @param[out] orders_array
4695 /// The order of each curve will be returned in this
4696 /// array.
4697 ///
4698 /// @param[in] start
4699 /// The index of the first curve.
4700 ///
4701 /// @param[in] length
4702 /// The number of curves' orders to retrieve.
4703 ///
4704 HAPI_DECL HAPI_GetCurveOrders( const HAPI_Session * session,
4705  HAPI_AssetId asset_id,
4706  HAPI_ObjectId object_id,
4707  HAPI_GeoId geo_id,
4708  HAPI_PartId part_id,
4709  int * orders_array,
4710  int start, int length );
4711 
4712 /// @brief Retrieve the knots of the curves in this part.
4713 ///
4714 /// @param[in] session
4715 /// The session of Houdini you are interacting with.
4716 /// See @ref HAPI_Sessions for more on sessions.
4717 /// Pass NULL to just use the default in-process session.
4718 ///
4719 /// @param[in] asset_id
4720 /// The asset id.
4721 ///
4722 /// @param[in] object_id
4723 /// The object id.
4724 ///
4725 /// @param[in] geo_id
4726 /// The geometry id.
4727 ///
4728 /// @param[in] part_id
4729 /// The part id.
4730 ///
4731 /// @param[out] knots_array
4732 /// The knots of each curve will be returned in this
4733 /// array.
4734 ///
4735 /// @param[in] start
4736 /// The index of the first curve.
4737 ///
4738 /// @param[in] length
4739 /// The number of curves' knots to retrieve. The
4740 /// length of all the knots on a single curve is
4741 /// the order of that curve plus the number of
4742 /// vertices (see ::HAPI_GetCurveOrders(),
4743 /// and ::HAPI_GetCurveCounts()).
4744 ///
4745 HAPI_DECL HAPI_GetCurveKnots( const HAPI_Session * session,
4746  HAPI_AssetId asset_id,
4747  HAPI_ObjectId object_id,
4748  HAPI_GeoId geo_id,
4749  HAPI_PartId part_id,
4750  float * knots_array,
4751  int start, int length );
4752 
4753 /// @brief Set meta-data for the curve mesh, including the
4754 /// curve type, order, and periodicity.
4755 ///
4756 /// @param[in] session
4757 /// The session of Houdini you are interacting with.
4758 /// See @ref HAPI_Sessions for more on sessions.
4759 /// Pass NULL to just use the default in-process session.
4760 ///
4761 /// @param[in] asset_id
4762 /// The asset id.
4763 ///
4764 /// @param[in] object_id
4765 /// The object id.
4766 ///
4767 /// @param[in] geo_id
4768 /// The geometry id.
4769 ///
4770 /// @param[in] part_id
4771 /// Currently unused. Input asset geos are assumed
4772 /// to have only one part.
4773 ///
4774 /// @param[in] info
4775 /// The curve info represents the meta-data about
4776 /// the curves, including the type, order,
4777 /// and periodicity.
4778 ///
4779 HAPI_DECL HAPI_SetCurveInfo( const HAPI_Session * session,
4780  HAPI_AssetId asset_id,
4781  HAPI_ObjectId object_id,
4782  HAPI_GeoId geo_id,
4783  HAPI_PartId part_id,
4784  const HAPI_CurveInfo * info );
4785 
4786 /// @brief Set the number of vertices for each curve in the part.
4787 ///
4788 /// @param[in] session
4789 /// The session of Houdini you are interacting with.
4790 /// See @ref HAPI_Sessions for more on sessions.
4791 /// Pass NULL to just use the default in-process session.
4792 ///
4793 /// @param[in] asset_id
4794 /// The asset id.
4795 ///
4796 /// @param[in] object_id
4797 /// The object id.
4798 ///
4799 /// @param[in] geo_id
4800 /// The geometry id.
4801 ///
4802 /// @param[in] part_id
4803 /// Currently unused. Input asset geos are assumed
4804 /// to have only one part.
4805 ///
4806 /// @param[in] counts_array
4807 /// The number of cvs each curve contains.
4808 ///
4809 /// @param[in] start
4810 /// The index of the first curve.
4811 ///
4812 /// @param[in] length
4813 /// The number of curves' counts to set.
4814 ///
4815 HAPI_DECL HAPI_SetCurveCounts( const HAPI_Session * session,
4816  HAPI_AssetId asset_id,
4817  HAPI_ObjectId object_id,
4818  HAPI_GeoId geo_id,
4819  HAPI_PartId part_id,
4820  const int * counts_array,
4821  int start, int length );
4822 
4823 /// @brief Set the orders for each curve in the part if the
4824 /// curve has varying order.
4825 ///
4826 /// @param[in] session
4827 /// The session of Houdini you are interacting with.
4828 /// See @ref HAPI_Sessions for more on sessions.
4829 /// Pass NULL to just use the default in-process session.
4830 ///
4831 /// @param[in] asset_id
4832 /// The asset id.
4833 ///
4834 /// @param[in] object_id
4835 /// The object id.
4836 ///
4837 /// @param[in] geo_id
4838 /// The geometry id.
4839 ///
4840 /// @param[in] part_id
4841 /// Currently unused. Input asset geos are assumed
4842 /// to have only one part.
4843 ///
4844 /// @param[in] orders_array
4845 /// The orders of each curve.
4846 ///
4847 /// @param[in] start
4848 /// The index of the first curve.
4849 ///
4850 /// @param[in] length
4851 /// The number of curves' orders to retrieve.
4852 ///
4853 HAPI_DECL HAPI_SetCurveOrders( const HAPI_Session * session,
4854  HAPI_AssetId asset_id,
4855  HAPI_ObjectId object_id,
4856  HAPI_GeoId geo_id,
4857  HAPI_PartId part_id,
4858  const int * orders_array,
4859  int start, int length );
4860 
4861 /// @brief Set the knots of the curves in this part.
4862 ///
4863 /// @param[in] session
4864 /// The session of Houdini you are interacting with.
4865 /// See @ref HAPI_Sessions for more on sessions.
4866 /// Pass NULL to just use the default in-process session.
4867 ///
4868 /// @param[in] asset_id
4869 /// The asset id.
4870 ///
4871 /// @param[in] object_id
4872 /// The object id.
4873 ///
4874 /// @param[in] geo_id
4875 /// The geometry id.
4876 ///
4877 /// @param[in] part_id
4878 /// Currently unused. Input asset geos are assumed
4879 /// to have only one part.
4880 ///
4881 /// @param[in] knots_array
4882 /// The knots of each curve.
4883 ///
4884 /// @param[in] start
4885 /// The index of the first curve.
4886 ///
4887 /// @param[in] length
4888 /// The number of curves' knots to set. The
4889 /// length of all the knots on a single curve is
4890 /// the order of that curve plus the number of
4891 /// vertices (see ::HAPI_SetCurveOrders(),
4892 /// and ::HAPI_SetCurveCounts()).
4893 ///
4894 HAPI_DECL HAPI_SetCurveKnots( const HAPI_Session * session,
4895  HAPI_AssetId asset_id,
4896  HAPI_ObjectId object_id,
4897  HAPI_GeoId geo_id,
4898  HAPI_PartId part_id,
4899  const float * knots_array,
4900  int start, int length );
4901 
4902 // CACHING ------------------------------------------------------------------
4903 
4904 /// @brief Get the number of currently active caches.
4905 ///
4906 /// @param[in] session
4907 /// The session of Houdini you are interacting with.
4908 /// See @ref HAPI_Sessions for more on sessions.
4909 /// Pass NULL to just use the default in-process session.
4910 ///
4911 /// @param[out] active_cache_count
4912 /// The number of currently active caches.
4913 ///
4915  int * active_cache_count );
4916 
4917 /// @brief Get the names of the currently active caches.
4918 ///
4919 /// Requires a valid active cache count which you get from:
4920 /// ::HAPI_GetActiveCacheCount().
4921 ///
4922 /// @param[in] session
4923 /// The session of Houdini you are interacting with.
4924 /// See @ref HAPI_Sessions for more on sessions.
4925 /// Pass NULL to just use the default in-process session.
4926 ///
4927 /// @param[out] cache_names_array
4928 /// String array with the returned cache names. Must be
4929 /// at least the size of @a active_cache_count.
4930 ///
4931 /// @param[in] active_cache_count
4932 /// The count returned by ::HAPI_GetActiveCacheCount().
4933 ///
4935  HAPI_StringHandle * cache_names_array,
4936  int active_cache_count );
4937 
4938 /// @brief Lets you inspect specific properties of the different memory
4939 /// caches in the current Houdini context.
4940 ///
4941 /// @param[in] session
4942 /// The session of Houdini you are interacting with.
4943 /// See @ref HAPI_Sessions for more on sessions.
4944 /// Pass NULL to just use the default in-process session.
4945 ///
4946 /// @param[in] cache_name
4947 /// Cache name from ::HAPI_GetActiveCacheNames().
4948 ///
4949 /// @param[in] cache_property
4950 /// The specific property of the cache to get the value for.
4951 ///
4952 /// @param[out] property_value
4953 /// Returned property value.
4954 ///
4956  const char * cache_name,
4957  HAPI_CacheProperty cache_property,
4958  int * property_value );
4959 
4960 /// @brief Lets you modify specific properties of the different memory
4961 /// caches in the current Houdini context. This includes clearing
4962 /// caches, reducing their memory use, or changing how memory limits
4963 /// are respected by a cache.
4964 ///
4965 /// @param[in] session
4966 /// The session of Houdini you are interacting with.
4967 /// See @ref HAPI_Sessions for more on sessions.
4968 /// Pass NULL to just use the default in-process session.
4969 ///
4970 /// @param[in] cache_name
4971 /// Cache name from ::HAPI_GetActiveCacheNames().
4972 ///
4973 /// @param[in] cache_property
4974 /// The specific property of the cache to modify.
4975 ///
4976 /// @param[in] property_value
4977 /// The new property value.
4978 ///
4980  const char * cache_name,
4981  HAPI_CacheProperty cache_property,
4982  int property_value );
4983 
4984 /// @brief Saves a geometry to file. The type of file to save is
4985 /// to be determined by the extension ie. .bgeo, .obj
4986 ///
4987 /// @param[in] session
4988 /// The session of Houdini you are interacting with.
4989 /// See @ref HAPI_Sessions for more on sessions.
4990 /// Pass NULL to just use the default in-process session.
4991 ///
4992 /// @param[in] asset_id
4993 /// The asset id.
4994 ///
4995 /// @param[in] object_id
4996 /// The object id.
4997 ///
4998 /// @param[in] geo_id
4999 /// The geometry id.
5000 ///
5001 /// @param[in] file_name
5002 /// The name of the file to be saved. The extension
5003 /// of the file determines its type.
5004 ///
5005 HAPI_DECL HAPI_SaveGeoToFile( const HAPI_Session * session,
5006  HAPI_AssetId asset_id,
5007  HAPI_ObjectId object_id,
5008  HAPI_GeoId geo_id,
5009  const char * file_name );
5010 
5011 /// @brief Loads a geometry file and put its contents onto a SOP
5012 /// node.
5013 ///
5014 /// @param[in] session
5015 /// The session of Houdini you are interacting with.
5016 /// See @ref HAPI_Sessions for more on sessions.
5017 /// Pass NULL to just use the default in-process session.
5018 ///
5019 /// @param[in] asset_id
5020 /// The asset id.
5021 ///
5022 /// @param[in] object_id
5023 /// The object id.
5024 ///
5025 /// @param[in] geo_id
5026 /// The geometry id.
5027 ///
5028 /// @param[in] file_name
5029 /// The name of the file to be loaded
5030 ///
5032  HAPI_AssetId asset_id,
5033  HAPI_ObjectId object_id,
5034  HAPI_GeoId geo_id,
5035  const char * file_name );
5036 
5037 /// @brief Cache the current state of the geo to memory, given the
5038 /// format, and return the size. Use this size with your call
5039 /// to ::HAPI_SaveGeoToMemory() to copy the cached geo to your
5040 /// buffer. It is guaranteed that the size will not change between
5041 /// your call to ::HAPI_GetGeoSize() and ::HAPI_SaveGeoToMemory().
5042 ///
5043 /// @param[in] session
5044 /// The session of Houdini you are interacting with.
5045 /// See @ref HAPI_Sessions for more on sessions.
5046 /// Pass NULL to just use the default in-process session.
5047 ///
5048 /// @param[in] asset_id
5049 /// The asset id.
5050 ///
5051 /// @param[in] object_id
5052 /// The object id.
5053 ///
5054 /// @param[in] geo_id
5055 /// The geometry id.
5056 ///
5057 /// @param[in] format
5058 /// The file format, ie. "obj", "bgeo" etc.
5059 ///
5060 /// @param[out] size
5061 /// The size of the buffer required to hold the output.
5062 ///
5063 HAPI_DECL HAPI_GetGeoSize( const HAPI_Session * session,
5064  HAPI_AssetId asset_id,
5065  HAPI_ObjectId object_id,
5066  HAPI_GeoId geo_id,
5067  const char * format,
5068  int * size );
5069 
5070 /// @brief Saves the cached geometry to your buffer in memory,
5071 /// whose format and required size is identified by the call to
5072 /// ::HAPI_GetGeoSize(). The call to ::HAPI_GetGeoSize() is
5073 /// required as ::HAPI_GetGeoSize() does the actual saving work.
5074 ///
5075 /// Also note that this call to ::HAPI_SaveGeoToMemory will delete
5076 /// the internal geo buffer that was cached in the previous call
5077 /// to ::HAPI_GetGeoSize(). This means that you will need to call
5078 /// ::HAPI_GetGeoSize() again before you can call this function.
5079 ///
5080 /// @param[in] session
5081 /// The session of Houdini you are interacting with.
5082 /// See @ref HAPI_Sessions for more on sessions.
5083 /// Pass NULL to just use the default in-process session.
5084 ///
5085 /// @param[in] asset_id
5086 /// The asset id.
5087 ///
5088 /// @param[in] object_id
5089 /// The object id.
5090 ///
5091 /// @param[in] geo_id
5092 /// The geometry id.
5093 ///
5094 /// @param[out] buffer
5095 /// The buffer we will write into.
5096 ///
5097 /// @param[in] length
5098 /// The size of the buffer passed in.
5099 ///
5101  HAPI_AssetId asset_id,
5102  HAPI_ObjectId object_id,
5103  HAPI_GeoId geo_id,
5104  char * buffer,
5105  int length );
5106 
5107 /// @brief Loads a geometry from memory and put its
5108 /// contents onto a SOP node.
5109 ///
5110 /// @param[in] session
5111 /// The session of Houdini you are interacting with.
5112 /// See @ref HAPI_Sessions for more on sessions.
5113 /// Pass NULL to just use the default in-process session.
5114 ///
5115 /// @param[in] asset_id
5116 /// The asset id.
5117 ///
5118 /// @param[in] object_id
5119 /// The object id.
5120 ///
5121 /// @param[in] geo_id
5122 /// The geometry id.
5123 ///
5124 /// @param[in] format
5125 /// The file format, ie. "obj", "bgeo" etc.
5126 ///
5127 /// @param[in] buffer
5128 /// The buffer we will read the geomtry from.
5129 ///
5130 /// @param[in] length
5131 /// The size of the buffer passed in.
5132 ///
5134  HAPI_AssetId asset_id,
5135  HAPI_ObjectId object_id,
5136  HAPI_GeoId geo_id,
5137  const char * format,
5138  const char * buffer,
5139  int length );
5140 
5141 #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. Only applies to geometry nodes that are...
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.
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...