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