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