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