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