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