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