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