HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Node.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  * NAME: OBJ library (C++)
7  *
8  * COMMENTS: This defines a base object, here, children will inherit
9  * my attributes...
10  *
11  * My input (there's only one ever) is my "parent" in the
12  * object heirarchy, thus, I can have as many children as
13  * I want, but only one parent.
14  *
15  */
16 
17 #ifndef __OBJ_Node_h__
18 #define __OBJ_Node_h__
19 
20 #include "OBJ_API.h"
21 #include "OBJ_Error.h"
22 #include "OBJ_NodeFlags.h"
23 #include "OBJ_XformCache.h"
24 
25 #include <GU/GU_DetailHandle.h>
26 #include <GEO/GEO_PackedTypes.h>
27 
28 #include <OP/OP_DataMicroNode.h>
29 #include <OP/OP_Network.h>
30 #include <OP/OP_Node.h>
31 #include <OP/OP_Version.h>
33 
34 #include <UT/UT_Map.h>
35 #include <UT/UT_Matrix4.h>
36 #include <UT/UT_Playback.h>
37 #include <UT/UT_ValArray.h>
38 
39 #include <stddef.h>
40 
41 
42 class CMD_Manager;
43 class GU_Detail;
44 class OBJ_Ambient;
45 class OBJ_Blend;
46 class OBJ_Bone;
47 class OBJ_Camera;
48 class OBJ_DopNet;
49 class OBJ_Fetch;
50 class OBJ_Fog;
51 class OBJ_Geometry;
52 class OBJ_Handle;
53 class OBJ_Light;
54 class OBJ_Null;
55 class OBJ_Rivet;
56 class OBJ_StereoCamera;
57 class OBJ_Sticky;
58 class OBJ_SubNet;
59 class OBJ_UndoPreTransform;
60 class OP_Options;
62 class PI_PropertyMap;
63 class SHOP_ReData;
64 class SOP_Node;
65 class UT_IStream;
66 class UT_Options;
67 class UT_String;
68 class UT_StringRef;
69 
70 
72 {
73  OBJ_WORLD = 0x00001, // unused
74  OBJ_GEOMETRY = 0x00002, // has geometry and should render
75  OBJ_CAMERA = 0x00004, // has viewing parameters
76  OBJ_LIGHT = 0x00008, // has light specific parameters
77  OBJ_RENDERER = 0x00010, // obsolete
78  OBJ_FOG = 0x00020, // atmosphere
79  OBJ_BONE = 0x00040, // bone parameters
80  OBJ_HANDLE = 0x00080, // geometry handle
81  OBJ_BLEND = 0x00100, // blend object
82  OBJ_FORCE = 0x00200, // object describing a force
83  OBJ_CAMSWITCH= 0x00400, // switch between multiple cameras
84  OBJ_SOUND = 0x00800, // sound object
85  OBJ_MICROPHONE = 0x01000, // microphone object
86  OBJ_SUBNET = 0x02000, // subnet object
87  OBJ_FETCH = 0x04000, // fetch object
88  OBJ_NULL = 0x08000, // null object
89  OBJ_STICKY = 0x10000, // sticky object
90  OBJ_DOPNET = 0x20000, // DOP network object
91  OBJ_RIVET = 0x40000, // rivet object
92  OBJ_MUSCLE = 0x80000,
93 
94  // the above are the basic types used in the bitfield defining
95  // an objects characteristics. Below are some common combinations.
96  OBJ_STD_LIGHT = OBJ_CAMERA|OBJ_LIGHT, // ambient doesn't have CAMERA
111 };
112 
114 {
119 };
120 
122 {
124  OBJ_SHADER_MATERIAL, // Assign shader to material
125  OBJ_SHADER_SPARE, // Parameter on object
126  OBJ_SHADER_PROPERTY, // Parameter on property SHOP
127 };
128 
130 {
133 };
134 
136 {
137  T,
138  R,
139  S,
140  P,
141  All
142 };
143 
144 #define OBJ_MATERIAL_SPARE_TAG "material_spare"
145 
147 {
148  // Transform
162 
173 
174  // Render
177 
178  // Misc
184 
185 
186  I_N_BASE_INDICES // should always be last in the list
187 };
188 
190  OBJ_VAR_IPT, // Instance point
192 };
193 
194 // We must maintain this order! If you change/add to OBJ_KeepPosType, then
195 // you must also fix it in OBJ_Command.C
197 {
201 
202  OBJ_KEEPPOS_NUM_FLAGS // should always be last in the list
203 };
204 
205 typedef enum {
210 
211 
212 #define OBJ_SELECTABLE_FLAG 'S'
213 
214 #define FLOAT_OBJ_PARM(name, idx, vi, t) \
215  return evalFloat(name, &getIndirect()[idx], vi, t);
216 #define FLOAT_OBJ_PARMS(name, idx, v, t) \
217  evalFloats(name, &getIndirect()[idx], v, t);
218 #define INT_OBJ_PARM(name, idx, vi, t) \
219  return evalInt(name, &getIndirect()[idx], vi, t);
220 #define STR_OBJ_PARM(name, idx, vi, t) \
221  evalString(str, name, &getIndirect()[idx], vi, t);
222 #define SET_FLOAT(name, parm_index, vector_index, t, val, add_key) \
223  setFloat(name, getIndirect()[parm_index], vector_index, t, val, add_key);
224 #define SET_INT(name, parm_index, vector_index, t, val) \
225  setInt(name, getIndirect()[parm_index], vector_index, t, val);
226 #define SET_STRING(val, name, parm_index, vector_index, t) \
227  setString(val, name, getIndirect()[parm_index], vector_index, t);
228 
230 {
231 public:
232  virtual const char *getChildType() const override;
233  virtual const char *getOpType() const override;
234 
235  virtual OP_OpTypeId getChildTypeID() const override;
236  virtual OP_OpTypeId getOpTypeID() const override;
237  static const char *theChildTableName;
238 
239  // We must never use the result of this method to do a c-style cast.
240  // If you need to cast, then use the casting methods provided.
241  virtual OBJ_OBJECT_TYPE getObjectType() const = 0;
242 
243  virtual bool evalVariableValue(fpreal &val,
244  int var_id,
245  int thread) override;
246 
248  int index,
249  int thread) override
250  {
252  val, index, thread);
253  }
254 
255  // Global list of all known obsolete lists...
256  static PRM_Template *getObsolete();
257  static PRM_Template *mergeObsoleteLists(PRM_Template *t1,
258  PRM_Template *t2);
259  static CH_LocalVariable ourLocalVariables[];
260 
261  // This finds all the known types and resolves them. It doesn't mind
262  // if they don't exist.
263  virtual void resolveObsoleteParms(
264  PRM_ParmList *obsolete_parms) override;
265 
266  // Resolves a specific parm...
267  void applyBackwardsPathCompatibility(
268  PRM_ParmList *obsolete_parms,
269  const char *oldname,
270  const char *newname,
271  const char *root = "/obj/",
272  const char *tail = "");
273  void applyBackwardsNetNodeCompatibility(
274  PRM_ParmList *obsolete_parms,
275  const char *oldnetname,
276  const char *oldnodename,
277  const char *newname,
278  const char *rootname,
279  const char *property_parm=0);
280  // This is a SHOP specific style one. As SHOP_PATHs allowed any arbitrary
281  // path internally, merely requiring they are relative to /shop, we
282  // cannot just blindly prefix /shop/. Specifically, if the old path
283  // was /shop/bar, we don't want /shop//shop/bar.
284  void applyBackwardsShopCompatibility(
285  PRM_ParmList *obsolete_parms,
286  const char *oldname,
287  const char *newname);
288 
289  // These are convenience functions. Do NOT override in subclasses!
290  // Override the appropriate apply.*Transform() function instead!
291  // NOTE: there are exceptions to the comment above. Notably, the
292  // OBJ_Bone class has no notion of scaling along one axis only.
293  // It also treats rotations specially, and therefore it overrides
294  // the parameter transformation methods below.
295 
296  /// Get the transform built from the trs parms of this object
297  /// @param context The cook context, which contains the time.
298  /// @param xform The output parameter, that contains the matrix described
299  /// by the transformation parameters (rotation, tranlation,
300  /// and scale).
301  virtual bool getParmTransform(OP_Context &context, UT_DMatrix4 &xform );
302  virtual bool getParmTransformRotates(OP_Context &context,
303  UT_DMatrix4 &xform );
304  virtual bool getParmTransformTranslates(OP_Context &context,
305  UT_DMatrix4 &xform );
306  virtual bool getParmTransformScales(OP_Context &context,
307  UT_DMatrix4 &xform );
308 
310  { return myUseFullTransformModel; }
311 
312  // Delete all channels on the transform parms.
313  void destroyTransformParmChannels();
314 
315  // set the trs parms of the object to match the given world
316  // transform. rigid parm transform omits scales. Returns
317  // false if fail_if_any_locked_parms is true and any of the
318  // parms are locked. Whether or not we change locked
319  // parms, when not automatically failing, is specified by
320  // skip_locked_parms.
321  bool setParmTransformFromWorld(
322  OP_Context &context, const UT_DMatrix4 &world_xform,
323  bool create_keys = false,
324  bool fail_if_any_locked_parms = false,
325  bool change_locked_parms = false);
326  void setRigidParmTransformFromWorld(
327  OP_Context &context, const UT_DMatrix4 &world_xform,
328  bool create_keys = false );
329  // set the trs parms of the object to match the given parm
330  // transform. rigid parm transform omits scales. Returns
331  // false if fail_if_any_locked_parms is true and any of the
332  // parms are locked. Whether or not we change locked
333  // parms, when not automatically failing, is specified by
334  // skip_locked_parms.
335  bool setParmTransform( OP_Context &context, const UT_DMatrix4 &xform,
336  bool create_keys = false,
337  bool fail_if_any_locked_parms = false,
338  bool change_locked_parms = false,
339  const UT_Vector3R *rotate_vals = NULL
340  );
341 
342  void setRigidParmTransform( OP_Context &context,
343  const UT_DMatrix4 &xform,
344  bool create_keys = false );
345 
346  /// Get the pivot transform built from the pivot parms of this object
347  /// @param context The cook context, which contains the time.
348  /// @param xform The output parameter, that contains the matrix described
349  /// by the pivot transformation parameters (rotation and
350  /// and translation).
351  bool getParmPivotTransform(OP_Context &context, UT_DMatrix4 &xform);
352 
353  /// Set the pivot transform parms from the rotates and translates in the
354  /// given xform matrix.
355  bool setParmPivotTransform(OP_Context &context, const UT_DMatrix4 &xform,
356  bool create_keys = false,
357  bool fail_if_any_locked_parms = false,
358  bool change_locked_parms = false,
359  const UT_Vector3R *rotate_vals = NULL);
360 
361  /// Obtains an accumulation of input independedn and pre-transform matrices.
362  /// This is equivalent to:
363  /// applyPreTransform(applyInputIndependent(identity))
364  /// Which is is the portion of the local transform that does not
365  /// depend on the parameters (transform or look-at). It is not widely used
366  /// and only relevant for the handles to orient themselves in parent space.
367  ///
368  /// @param context The cook context, which contains the time.
369  /// @param mat The output parameter that will contain the calculated
370  /// matrix.
371  /// @return 0 if mat is the identity, non-zero otherwise.
372  int getPreLocalTransform(OP_Context &context, UT_DMatrix4 &mat);
373 
374  /// Obtains the effective local transform which does not depend on input
375  /// nodes. This transform includes input independent matrix, pre-transform
376  /// matrix, parameter transform matrix, and the look-at matrix. This method
377  /// first cooks the object (if necessary) and then returns the member
378  /// variable myXform.
379  ///
380  /// @param context The cook context, which contains the time.
381  /// @param mat The output parameter that will contain the calculated
382  /// matrix.
383  bool getLocalTransform(OP_Context &context, UT_DMatrix4 &mat);
384 
385  /// Calculates the inverse of the getLocalToWorldTransform()
386  bool getInverseLocalToWorldTransform(
387  OP_Context &context, UT_DMatrix4 &mat);
388 
389  /// Returns the effective world transform of the parent.
390  /// The input depenent transform ensures that any externally dependent
391  /// transformation have been taken into account (eg, the length of the
392  /// parent bone for OBJ_Bone). This transform is the base to which all the
393  /// local transforms are applied (pre-transform, parameter, etc).
394  ///
395  /// In terms of methods this is calculated by
396  /// applyInputDependentTransform(
397  /// getParentObject()->getChildToWorldTransform())
398  /// If @c getParentObject() is @c NULL, then it simply returns @c
399  /// applyInputDependentTransform(identity_matrix).
400  ///
401  /// Use this function to convert
402  /// coordinates that have @b not been transformed by the follow path or
403  /// pre-transform. Typically, this function is only used internally for
404  /// manipulating the pre-transform. If the object is in a subnet,
405  /// then this will include the subnet's world transform.
406  ///
407  /// @param context The cook context, which contains the time.
408  /// @param mat The output parameter that will contain the calculated
409  /// matrix.
410  bool getParentToWorldTransform(OP_Context &context, UT_DMatrix4 &mat);
411 
412  /// Returns a transform matrix that is only missing the
413  /// local and look-at components.
414  /// In terms of methods this is calculated by
415  /// applyPreTransform( applyInputIndependentTransform(
416  /// getParentToWorldTransform()))
417  /// Use this function to convert co-ordinates from object space to world
418  /// space. Object space includes everything @b except the object's local
419  /// transform parameters. Typically, this function is used by handles to
420  /// place themselves relative to the origin of the object.
421  ///
422  /// @param context The cook context, which contains the time.
423  /// @param mat The output parameter that will contain the calculated
424  /// matrix.
425  bool getObjectToWorldTransform(OP_Context &context, UT_DMatrix4 &mat);
426 
427  /// Calculates the inverse of the getObjectToWorldTransform().
428  bool getInverseObjectToWorldTransform(
429  OP_Context &context, UT_DMatrix4 &mat);
430 
431  /// Returns the full world transform of the object including
432  /// all the component sub-matrices (parent and local).
433  /// This is equivalent to
434  /// getLocalTransform() * getParentToWorldTransform()
435  /// Use this function to convert co-ordinates from the local (geometry)
436  /// space to world space. It cooks the object first and returns the member
437  /// variable @c myWorldTransform. Typically, this function is used to place
438  /// child SOPs of the object in world space.
439  ///
440  /// @param context The cook context, which contains the time.
441  /// @param mat The output parameter that will contain the calculated
442  /// matrix.
443  bool getLocalToWorldTransform(OP_Context &context, UT_DMatrix4 &mat);
444 
445  /// Returns the transforms provided by the object's parent.
446  /// This is equivalent to applyOutputTransform( getLocalToWorldTransform())
447  /// Typically, this function is only used internally for the implementation
448  /// of @c getParentToWorldTransform().
449  ///
450  /// Note that in general, the following inequality holds, unless @c
451  /// applyInputDependentTransform() has no effect:
452  /// @code
453  /// getParentToWorldTransform() !=
454  /// getParentObject()->getChildToWorldTransform()
455  /// @endcode
456  bool getChildToWorldTransform(OP_Context &context, UT_DMatrix4 &mat);
457 
458 
459  /// Obtains the world space matrix before the constraints were applied.
460  ///
461  /// @param context The cook context, which contains the time.
462  /// @param mat The output parameter that will contain the calculated
463  /// matrix.
464  SYS_DEPRECATED(16.5) // No longer needed or functional.
465  bool getPreConstraintsTransform(OP_Context &context, UT_DMatrix4 &mat);
466 
467  // single precision versions of the above functions
468  // (slightly less efficient since it has to do it in double precision and
469  // then assign it to single precision)
470  bool getParmTransform(OP_Context &context, UT_Matrix4 &xform );
471  bool getParmPivotTransform(OP_Context &context, UT_Matrix4 &xform );
472  int getPreLocalTransform(OP_Context &context, UT_Matrix4 &mat);
473  bool getLocalTransform(OP_Context &context, UT_Matrix4 &mat);
474  bool getParentToWorldTransform(OP_Context &context, UT_Matrix4 &mat);
475  bool getObjectToWorldTransform(OP_Context &context, UT_Matrix4 &mat);
476  bool getInverseObjectToWorldTransform(
477  OP_Context &context, UT_Matrix4 &mat);
478  bool getLocalToWorldTransform(OP_Context &context, UT_Matrix4 &mat);
479  bool getInverseLocalToWorldTransform(
480  OP_Context &context, UT_Matrix4 &mat);
481  bool getChildToWorldTransform(OP_Context &context, UT_Matrix4 &mat);
482  SYS_DEPRECATED(16.5) // No longer needed or functional.
483  bool getPreConstraintsTransform(OP_Context &context, UT_Matrix4 &mat);
484 
485  // 2d methods.
486  bool getLocal2DToWorldTransform(OP_Context &context, UT_DMatrix4 &mat);
487  virtual bool get2DWorldTransform(UT_DMatrix4 &mat, OP_Context &context);
488 
489  // functions to override those in OP_Node.h
490  virtual bool getWorldTransform(UT_Matrix4D &mat,
491  OP_Context &context) override;
492  virtual bool getIWorldTransform(UT_Matrix4D &mat,
493  OP_Context &context) override;
494  virtual bool getTransform( TransformMode mode, UT_Matrix4D &mat,
495  OP_Context &context) override;
496  virtual int getRelativeTransform(OP_Node &to,
497  UT_Matrix4 &xform,
498  OP_Context &context) override;
499  virtual int getRelativeTransform(OP_Node &to,
500  UT_DMatrix4 &xform,
501  OP_Context &context) override;
502 
503  // This is used by specialized channel functions like qlinear()
504  // to determine what the transform order should be:
505  virtual void getXformOrder(UT_XformOrder &xord,
506  const CH_Channel *chp) const override;
507 
508  // the following two methods are to be used along with
509  // keepWorldTransformByOldInput()
510  int keepPosWhenParenting();
511  bool getPreTransformInput(OP_Context &context,
512  UT_DMatrix4 &mat);
513  int keepPosWhenMoving();
514 
515  /// This method considers the effect of the LOOKAT fields and produces
516  /// a matrix that should be premultiplied to the orienation to get the
517  /// lookat. It takes the local->world transform (myWorldXform) as this
518  /// is used to figure out where this is outside cookpaths.
519  /// If 'interest' is supplied, then interest will be onto this other node
520  /// instead.
521  /// NOTE: this function is virtual, because OBJ_Bone has a "capture"
522  /// mode in which the lookAt parameter (or input node's transform
523  /// for that matter) is ignored. Bones
524  /// override this method to provide the mode-dependent transorm.
525  /// @param context The cook context, which contains the time.
526  /// @param world The world matrix based on which the lookat matrix is
527  /// calculated.
528  /// @param lookat The output parameter that will contain a calucated
529  /// look-at matrix. That look-at matrix will be
530  /// pre-multiplied with the local and the world transforms
531  /// to calculate their final form.
532  /// @param interest Usually, this node will register an interest in the
533  /// look-at object, so it gets dirtied when the look-at
534  /// object moves. The interest parameter specifies a node
535  /// that should be dirtied instead of the object on which
536  /// buildLookAt() got invoked.
537  ///
538  /// @return This returns 0 if no lookat is needed, in which case the matrix
539  /// provided will not be altered!
540  virtual int buildLookAt(OP_Context &context,
541  const UT_DMatrix4 &world,
542  UT_DMatrix4 &lookat,
543  OP_Node *interest = 0);
544  /// A stand alone version of buildLookAt that is not connected to the ui
545  /// and always takes an upvector.
546  int buildLookAt(OP_Context &context,
547  const UT_DMatrix4 &worldxform,
548  const UT_String &lookat,
549  UT_DMatrix4 &lookatxform,
550  UT_Vector3R &up);
551  // Returns whether or not the lookat object is time dependent.
552  bool getLookatObjectIsTimeDependent(const UT_String &lookat,
553  fpreal t);
554  // Returns the local to world transform of the lookat object.
555  // Optionally adds an extra input. Returns true if a valid lookat
556  // object was found. Sets xform to identity if no lookat or an
557  // invalid lookat was found.
558  bool getLookatObjectTransform(const UT_String &lookat,
559  OP_Context &context,
560  OP_Node *addextrainputto,
561  UT_DMatrix4 &xform,
562  bool &timedep);
563  // getPreLookatTransform gives us the pretransform matrix for an object
564  // that can later be used to create a lookat matrix with buildinglookat.
565  // getPreLooaktTransform can calculate the whole prelook at matrix,
566  // which is the default setting or calculate the matrix without the
567  // rotates included.
568  int getPreLookatTransform(OP_Context &context,
569  UT_DMatrix4 &wolrdXform,
570  UT_DMatrix4 &xform,
571  bool norotates = false);
572  // maintain the original world position as if we were using the old
573  // parent world xform by modifying the pretransform
574  int keepWorldTransformByOldInput(OP_Context &context,
575  const UT_DMatrix4 &old_parent_world_xform);
576 
577  // maintain the last cooked world transform by modifying pretransform/parms
578  void keepLastWorldTransform(OP_Context &context);
579 
580  // Returns whether or not the lookat object is time dependent.
581  bool getPathObjectIsTimeDependent(const UT_String &path,
582  fpreal t);
583  // Returns the local to world transform of the lookat object.
584  // Optionally adds an extra input. Returns true if a valid lookat
585  // object was found. Sets xform to identity if no lookat or an
586  // invalid lookat was found.
587  bool getPathObjectDetailHandle(const UT_String &path,
588  OP_Context &context,
590  UT_DMatrix4 &xform);
591 
592  // Callback for building custom world transforms from objects.
593  // The callback is responsible for setting the given matrix by
594  // the parm transform of the object.
595  // An example of using this would simply do
596  // node->getParmTransform(context,mat)
597  // Return 0 to stop processing, 1 to continue.
598  typedef int (*ApplyParmTransformCallback)(
599  void *data, OBJ_Node *node,
600  OP_Context &context, UT_DMatrix4 &mat);
601 
602  // Use these functions to build your own custom world transforms instead
603  // of traversing the object hieararchy yourself! If you do it yourself,
604  // then you will probably not take into account the output and
605  // pre-transforms.
606  // DO NOT CALL THESE WITHIN AN OBJECT COOK PATH!!
607  void buildCustomChildToWorldTransform(
608  OP_Context &context, UT_DMatrix4 &mat,
609  ApplyParmTransformCallback callback, void *data);
610  void buildCustomObjectToWorldTransform(
611  OP_Context &context, UT_DMatrix4 &mat,
612  ApplyParmTransformCallback callback, void *data);
613 
614  /// Set the given world position by only modifying the pre-transform.
615  /// This is less efficient than keepWorldTransformByOldInput() but more
616  /// general. If your local t,r,s parms have not been modified, then use
617  /// keepWorldTransformByOldInput instead.
618  ///
619  /// @param context The cook context, which contains the time.
620  /// @param world_xform The world transform to set for this object.
621  virtual int keepWorldTransform(
622  OP_Context &context,
623  const UT_DMatrix4 &world_xform );
624 
625  // this is overridden so that we can clear our own undo flags
626  virtual void clearUndoFlags() override;
627 
628  /// Stores the current pre-transform for future undo.
629  void savePreTransformForUndo();
630 
631  /// This sets the pre-transform to the identity matrix. This will modify
632  /// the object's world transform unless the pre-transform was already the
633  /// identity.
634  void resetPreTransform();
635 
636  /// This transfers the object's transform parameters (@c L) to the
637  /// pre-transform. This does not modify the effective world transform.
638  virtual void transferLocalToPreTransform(fpreal gtime);
639 
640  /// This extracts the object's pre-transform into its transform parameters.
641  /// If the extraction involved shears, then only the non-sheared portion
642  /// is extracted. This does not modify the effective world transform.
643  virtual void transferPreToLocalTransform(
644  fpreal gtime, bool follow_chan_refs = false);
645 
646  /// Transfers only the rotate portion of the matrix to pre-transform.
647  virtual void transferLocalToPreTransformRotates(fpreal gtime);
648 
649  /// Transfers only the translates portion of the matrix to pre-transform.
650  virtual void transferLocalToPreTransformTranslates(fpreal gtime);
651 
652  /// Transfers only the scales portion of the matrix to pre-transform.
653  virtual void transferLocalToPreTransformScales(fpreal gtime);
654 
655  /// This sets the pretransform to the given matrix. This will modify the
656  /// object's effective world transform unless the given pre-transform is
657  /// identity.
658  void setPreTransform(const UT_DMatrix4 &xform);
659 
660  // get the rotation euler angles that include the pre-transform
661  void getAdjustedRotates(OP_Context &context, UT_Vector3R &r);
662 
663  // Takes the given rotation in degrees and adjusts it to include the
664  // pretransform
665  void adjustRotatesToIncludePreTransform(
666  OP_Context &context, UT_Vector3R &r);
667 
668  // adjust the given rotations (in degrees) suitable for stuffing into a
669  // rotation parm taking into account the pre-transform
670  void adjustRotatesForPreTransform(
671  OP_Context &context,
672  int return_as_radian, UT_Vector3R &rot);
673 
674  /// Returns current pretransform matrix.
675  const UT_DMatrix4 & getPreTransform() const
676  { return myPreTransform; }
678  { return myPreTransform; }
680  { return myPreTransformIsIdentity; }
682  { myPreTransformIsIdentity = yesno; }
683 
684  virtual int setPickable(int onOff) override;
685  virtual int getPickable() override;
686  int setCachable(int onOff);
687  int getCachable(int thread) const;
688  virtual int setFlag(char flag, int onoff) override;
689 
690  virtual bool getBoundingBox(UT_BoundingBox &box,
691  OP_Context &ctx) override;
692 
694  { return CAST_SOPNODE(getDisplayNodePtr()); }
696  { return CAST_SOPNODE(getRenderNodePtr()); }
698  { return CAST_DOPNODE(getDisplayNodePtr()); }
699 
700  GU_DetailHandle getDisplayGeometryHandle(OP_Context &context,
701  int check_enable=1,
702  OP_Node **source_node=0);
703  GU_DetailHandle getRenderGeometryHandle(OP_Context &context,
704  int check_enable=1);
705  const GU_Detail *getDisplayGeometry(OP_Context &context,
706  int check_enable=1,
707  OP_Node **source_node=0);
708  const GU_Detail *getRenderGeometry(OP_Context &context,
709  int check_enable=1);
710 
712  {
715  DEFORM
716  };
717  virtual obj_OnionSkin getOnionSkin() { return OFF; }
718  static void buildOperatorTable(OP_OperatorTable &table);
719  static void getManagementOperators(OP_OperatorList &op);
720  static void installCommands(CMD_Manager *cman);
721  static void initializeExpressions();
722  static void buildMaterialOptMenu(void *obj,
723  PRM_Name *names,
724  int size,
725  const PRM_SpareData *spare,
726  const PRM_Parm *parm);
727  static int handleMaterialOpt(void *obj,
728  int index,
729  fpreal now,
730  const PRM_Template *tplate);
731  bool processMaterialOpt(fpreal now, const char *operation,
732  int argc, const char *argv[],
733  UT_String &errors);
734 
735 
736  // These convience functions allow you to deal with COP2 paths
737  // and prepare them in a fashion the TIL resolver will liek.
738  int getFullCOP2Path(const char *relpath,
739  UT_String &fullpath, int &flagdependent);
740  void splitCOP2Path(const char *path,
741  UT_String &net, UT_String &nodepath);
742 
743 
744  // Menu callback functions available to general public
745 
746  static void buildObjectMenu(PRM_Name *, int max,
748  static void buildGeoObjMenu(
749  void *o, PRM_Name *, int,
750  const PRM_SpareData *, const PRM_Parm *);
751  static void buildPathObjMenu(
752  void *o, PRM_Name *, int,
753  const PRM_SpareData *, const PRM_Parm *);
754  static void buildKinChopMenu(
755  void *o, PRM_Name *, int,
756  const PRM_SpareData *, const PRM_Parm *);
757  static void buildPopGeoMenu(
758  void *o, PRM_Name *, int,
759  const PRM_SpareData *, const PRM_Parm *);
760  static void buildShadeObjMenu(
761  void *o, PRM_Name *, int,
762  const PRM_SpareData *, const PRM_Parm *);
763  static void buildColorPlaneMenu(
764  void *o, PRM_Name *, int,
765  const PRM_SpareData *, const PRM_Parm *);
766  static void buildAlphaPlaneMenu(
767  void *o, PRM_Name *, int,
768  const PRM_SpareData *, const PRM_Parm *);
769  static void buildGeoChopMenu(
770  void *o, PRM_Name *, int,
771  const PRM_SpareData *, const PRM_Parm *);
772  static void buildSoundChopMenu(
773  void *o, PRM_Name *, int,
774  const PRM_SpareData *, const PRM_Parm *);
775  static void buildMicChopMenu(
776  void *o, PRM_Name *, int,
777  const PRM_SpareData *, const PRM_Parm *);
778  static void buildChopNetMenu(
779  void *o, PRM_Name *, int,
780  const PRM_SpareData *, const PRM_Parm *);
781  static void buildBoneCaptureMenu(
782  void *o, PRM_Name *, int,
783  const PRM_SpareData *, const PRM_Parm *);
784  static void buildBoneChildMenu(
785  void *o, PRM_Name *, int,
786  const PRM_SpareData *, const PRM_Parm *);
787  static void buildChildObjMenu(
788  void *o, PRM_Name *, int,
789  const PRM_SpareData *, const PRM_Parm *);
790  static void buildPointGroupMenu(
791  void *o, PRM_Name *, int,
792  const PRM_SpareData *, const PRM_Parm *);
793  static void buildPrimitiveGroupMenu(
794  void *o, PRM_Name *, int,
795  const PRM_SpareData *, const PRM_Parm *);
796 
797  static int handlePreTransformMenu(void *o, int index, fpreal t,
798  const PRM_Template *);
799 
800  virtual int getDisplayOrigin() const override;
801  virtual int setDisplayOrigin(int on_off_unchanged) override;
802 
804  { return myObjFlags.getParentingErrorFlag(); }
806  { myObjFlags.setParentingErrorFlag(o); }
807 
808  virtual int isCookingRender() const override
809  { return myCookingRender ? 1:0; }
810 
811  virtual void setCookingRender(int val) override
812  { myCookingRender = (val!=0); }
813 
814  OBJ_NodeFlags &objflags() { return myObjFlags; }
815 
816  virtual OP_ERROR setInput(
817  unsigned idx, OP_Node *op,
818  unsigned outputIdx = 0) override;
819 
820  virtual OP_ERROR setInputReference(
821  unsigned idx, const char *label,
822  int keeppos,
823  unsigned outputIdx = 0) override;
824 
825  virtual OP_ERROR setIndirectInput(
826  unsigned idx,
827  OP_IndirectInput *in) override;
828 
829  virtual OP_ERROR setNamedInput(const OP_ConnectorId& input_name,
830  OP_Node *op,
831  const OP_ConnectorId* output_name = NULL
832  ) override;
833 
835  const OP_ConnectorId& input_name,
836  const char *label,
837  int,
838  const OP_ConnectorId* output_name = NULL) override;
839 
841  const OP_ConnectorId& input_name,
842  OP_IndirectInput *input) override;
843 
844  /// Override this to specify the inputs which are needed for cooking this
845  /// node which can be executed in parallel.
846  virtual void getParallelInputs(
847  OP_Context &context,
848  OP_NodeList &nodes) const override;
849 
851  { ourKeepPosWhenParenting = flag; }
853  { return ourKeepPosWhenParenting; }
854 
856  { ourKeepPosWhenMoving = flag; }
858  { return ourKeepPosWhenMoving; }
859 
860  static void disallowGlobalKeepPos();
861  static void allowGlobalKeepPos();
862 
863  static void disallowIgnorePretransform();
864  static void allowIgnorePretransform();
865 
867  { ourIgnorePretransformValue = flag; }
868  static bool getIgnorePretransform()
869  { return ourAllowIgnorePretransform
870  && ourIgnorePretransformValue; }
872  { return ourIgnorePretransformValue; }
873 
874  virtual void opChanged(OP_EventType reason,
875  void *data=0) override;
876  virtual void referencedParmChanged(int parm_index) override;
877 
878  // takes into account TRS order and pivot point
879  UT_Vector3R getLocalPivot(OP_Context &context);
880  UT_Vector3R getWorldPivot(OP_Context &context);
881 
882  void setParmFromHandle(
883  OP_Context &context,
884  PRM_Parm &parm,
885  int vec_idx,
886  fpreal val,
887  bool create_keys,
888  bool check_modified);
889  void setParmFromHandle(
890  OP_Context &context,
891  PRM_Parm &parm,
892  const UT_Vector3R &val,
893  bool create_keys = false,
894  int key_idx = -1,
895  bool check_modified = true);
896 
897  virtual void setScaleFromHandle(fpreal t, const UT_Vector3R &s,
898  bool create_keys = false,
899  int key_idx = -1,
900  bool check_modified = true);
901  virtual void setUniformScaleFromHandle(
902  fpreal t, fpreal uniform_scale,
903  bool create_keys = false,
904  bool check_modified = true);
905  virtual void setRotateFromHandle(fpreal t, const UT_Vector3R &r,
906  bool create_keys = false,
907  int key_idx = -1,
908  bool check_modified = true);
909  virtual void setTranslateFromHandle(fpreal t,
910  const UT_Vector3R &trans,
911  bool create_keys = false,
912  int key_idx = -1,
913  bool check_modified = true);
914  virtual void setPivotFromHandle(fpreal t,
915  const UT_Vector3R &pivot,
916  bool create_keys = false,
917  int key_idx = -1,
918  bool check_modified = true);
919  virtual void setPivotRotateFromHandle(fpreal t,
920  const UT_Vector3R &pivot_rotate,
921  bool create_keys = false,
922  int key_idx = -1,
923  bool check_modified = true);
924  void setXformOrderFromHandle(fpreal t, int value,
925  bool create_keys = false,
926  bool check_modified = true);
927 
928  virtual const char * getSetScaleParmName() const { return "s"; }
929  virtual const char * getSetRotateParmName() const { return "r"; }
930  virtual const char * getSetTranslateParmName() const { return "t"; }
931 
932  // Determines whether an object should be sent to renderers or not.
933  virtual int isObjectRenderable(fpreal t) const;
934 
935  // Function returns whether the object is lit by a particular light
936  virtual int isObjectLitBy(OBJ_Node *, fpreal) { return 0; }
937  /// Function to resolve lighting based on light masks
938  virtual bool isLightInLightMask(const OBJ_Node *light, fpreal now)
939  { return false; }
940 
941  // Function returns whether the object is lit by a particular subnet
942  virtual int isObjectLitBySubnet(OBJ_Node *, fpreal) { return 0; }
943 
944  // Function to return the subset of the specified lights which actually
945  // light this object. The default implementation uses the virtual
946  // isObjectLitBy method to determine this subset.
947  virtual void getActingLightSubset(
948  const UT_ValArray<OBJ_Ambient *> &lights,
950 
951  /// Return an interface to apply appearance operations. The default
952  /// behaviour is to return a NULL pointer.
953  virtual SOP_ObjectAppearancePtr getObjectAppearance();
954 
955  // Let each object type decide whether or not it should be drawn lit
956  virtual int doDrawLit() const { return 0; }
957 
958  static const char * displaySopToken;
959  static const char * renderSopToken;
960  static const char * boundingBoxToken;
961  static const char * boundingSphereToken;
962  static const char * input1ObjectToken;
963  static const char * input2ObjectToken;
964  static const char * input3ObjectToken;
965  static const char * input4ObjectToken;
966 
967  virtual void getNodeSpecificInfoText(OP_Context &context,
968  OP_NodeInfoParms &iparms) override;
969  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
970  const OP_NodeInfoTreeParms &parms) override;
971 
972  virtual void propagateEndBlockModify() override;
973 
974  //Absolute Width
975  virtual fpreal getW() const override;
976  //Absolute Height
977  virtual fpreal getH() const override;
978 
979 
980  virtual OBJ_Ambient *castToOBJAmbient() { return NULL; }
981  virtual OBJ_Blend *castToOBJBlend() { return NULL; }
982  virtual OBJ_Bone *castToOBJBone() { return NULL; }
983  virtual OBJ_Camera *castToOBJCamera() { return NULL; }
984  virtual OBJ_DopNet *castToOBJDopNet() { return NULL; }
985  virtual OBJ_Fetch *castToOBJFetch() { return NULL; }
986  virtual OBJ_Fog *castToOBJFog() { return NULL; }
987  virtual OBJ_Geometry*castToOBJGeometry() { return NULL; }
988  virtual OBJ_Handle *castToOBJHandle() { return NULL; }
989  virtual OBJ_Light *castToOBJLight() { return NULL; }
990  virtual OBJ_Null *castToOBJNull() { return NULL; }
991  virtual OBJ_Rivet *castToOBJRivet() { return NULL; }
992  virtual OBJ_Sticky *castToOBJSticky() { return NULL; }
993  virtual OBJ_SubNet *castToOBJSubNet() { return NULL; }
994  virtual OBJ_StereoCamera* castToOBJStereoCamera() { return NULL; }
995 
996  // Build a shader string for the object. If the shader string is built
997  // successfully, the SHOP which generated the string will be returned.
998  bool assignShader(int shop_type, const char *path,
999  OBJ_SHADER_LOCATION where);
1000  OP_Node *evalShaderString(UT_String &shader, int shop_type, fpreal now,
1001  const UT_Options *options, OP_Node *shader_node = 0);
1002  bool evalShaderHandle(UT_String &handle, int shop_type, fpreal now,
1003  const UT_Options *options, OP_Node *shader_node = 0);
1004  bool evalShaderLanguage(UT_String &lang, int shop_type, fpreal now,
1005  const UT_Options *options, OP_Node *shader_node = 0);
1006  OP_Node *evalShaderData(SHOP_ReData &data, int shop_type, fpreal now,
1007  const UT_Options *options, OP_Node *shader_node = 0);
1008  OP_Node *evalShaderBounds(UT_BoundingBox &box, int shop_type,fpreal now,
1009  const UT_Options *options, OP_Node *shader_node = 0);
1010  bool evalCoShaderStrings(UT_StringArray &strings,
1011  OP_NodeList &shops, int shop_type, fpreal now,
1012  const UT_Options *options, OP_Node *shader_node = 0);
1013  bool evalCoShaderHandles(UT_StringArray &handles,
1014  int shop_type, fpreal now,
1015  const UT_Options *options, OP_Node *shader_node = 0);
1016  bool evalCoShaderLanguages(UT_StringArray &languages,
1017  int shop_type, fpreal now,
1018  const UT_Options *options, OP_Node *shader_node = 0);
1019  void getShopTransform(UT_DMatrix4 &xform, int shop_type,
1020  fpreal now, const UT_Options *options);
1021 
1022  // Returns the token (name) of the material parameter.
1023  static const char *getMaterialParmToken();
1024 
1025  // Get a node specified as a material
1026  OP_Node *getMaterialNode( fpreal now );
1027 
1028  // Get a particular SHOP.
1029  OP_Node *getShaderNode(OP_Node *candidate, int shader_type,
1030  fpreal now, const UT_Options *options);
1031  OP_Node *getShaderNode(int shader_type, fpreal now,
1032  const UT_Options *options,
1033  DEP_MicroNode *dep = NULL);
1034 
1035  // Load up the options with the local parameter defintions
1036  virtual const UT_Options *createShaderParms(OP_Options &options,
1037  fpreal now,
1038  const UT_Options *src);
1039 
1040  // Combine the SOPs of other objects into this one. On success, returns
1041  // the display_merge SOP pointer, else NULL.
1042  //
1043  // objs List of objects to combine. These will be deleted on
1044  // return.
1045  // full_combine If true, it performs a combine with the existing SOPs
1046  // inside this object.
1047  // moved_map Optional. On return, this filled with a map of the
1048  // child node pointers from source node pointer to
1049  // destination node pointer.
1050  OP_Node *combine(OP_Context &context,
1051  const UT_ValArray<OBJ_Node *> &objs,
1052  bool full_combine = true,
1053  UT_Map<OP_Node *, OP_Node *> *moved_map = NULL);
1054 
1055  virtual bool getHideDefaultParms() const
1056  { return false; }
1057 
1058  virtual bool canCreateNewOpType() const override;
1059 
1060  virtual const OP_DataMicroNode &
1061  parmListMicroNodeConst() const override
1062  { return myXformMicroNode; }
1064  { return parmListMicroNodeConst().modVersion(); }
1065 
1066  // myXformCookLevel is positive during the cook of myXform
1067  virtual const OP_DataMicroNode &
1068  dataMicroNodeConst() const override
1069  {
1070  return (myXformCookLevel > 0)
1071  ? myXformMicroNode
1073  }
1074 
1075  // Set Parm Transform that can trigger notifications
1076  bool setParmTransform( OP_Context &context, const UT_DMatrix4 &xform,
1077  bool create_keys,
1078  bool fail_if_any_locked_parms,
1079  bool change_locked_parms,
1080  const UT_Vector3R *rotate_vals,
1081  bool check_modified
1082  );
1083  // Set Parm Pivot Transform that can trigger notifications
1084  bool setParmPivotTransform( OP_Context &context,
1085  const UT_DMatrix4 &xform,
1086  bool create_keys,
1087  bool fail_if_any_locked_parms,
1088  bool change_locked_parms,
1089  const UT_Vector3R *rotate_vals,
1090  bool check_modified
1091  );
1092 
1093  bool hasConstraints() const { return myHasConstraints; }
1094 
1095 protected:
1096 
1097  OBJ_Node(OP_Network *parent, const char *name, OP_Operator *op);
1098  virtual ~OBJ_Node();
1099 
1100  bool supportsDropShopType(int shop_type);
1101  virtual int acceptDragDrop(DD_Source &src,
1102  const char *label) override;
1103 
1104  virtual int testDragDrop(DD_Source &src) override;
1105  virtual void getDragDropChoice(DD_Source &src,
1106  DD_ChoiceList &c) override;
1107 
1108 
1109  // This method should add any extra interests that an object might
1110  // have. By default, geo instance, particle instance, shader spaces
1111  // etc. are added. This is called when objects cook.
1112  virtual void addExtraDependencies(OP_Context &context);
1113  virtual int getOpShadingInfo(UT_String &str, fpreal t);
1114  virtual int getOpConstraintsInfo(UT_String &str, fpreal t);
1115  virtual bool createSpareParametersFromChannels(
1117  const CH_ChannelList &channels) override;
1118  virtual bool createSpareParametersForLoad(UT_StringArray &names,
1119  PRM_ParmNameMap &nmap,
1120  UT_String &errors) override;
1121  virtual bool getParameterOrProperty(
1122  const UT_StringRef &name, fpreal now,
1123  OP_Node *&op, PRM_Parm *&parm,
1124  bool create_missing_multiparms,
1125  PRM_ParmList *obsolete = 0) override;
1126  virtual bool getParameterOrPropertyByChannel(
1127  const UT_StringRef &name,
1128  fpreal now,
1129  OP_Node *&op, PRM_Parm *&parm, int &vectoridx,
1130  PRM_ParmList *obsolete = 0) override;
1131  virtual int findParametersOrProperties(fpreal now,
1132  OP_PropertyLookupList &list) override;
1133 
1134  /// Computes and pre-multiplies an input dependent matrix to the given
1135  /// current matrix. This transform is
1136  /// defined as semantically dependent on the object's inputs. The OBJ_Blend
1137  /// object overrides this to do special processing. Also, the OBJ_Bone
1138  /// object overrides this to move its origin to the tip of the parent bone.
1139  /// By default, this method does not modify the given matrix, which is
1140  /// equivalent to identity matrix.
1141  /// @param context The cook context, which contains the time.
1142  /// @param mat Input and output parameter, that gets premuliplied by
1143  // the computed input dependent transform matrix, if any.
1144  ///
1145  /// @return Returns 1 if the matrix was modified, 0 otherwise
1146  virtual int applyInputDependentTransform(
1147  OP_Context &context, UT_DMatrix4 &mat);
1148 
1149  /// Computes and pre-multiplies an input independent transform to
1150  /// the given matrix.
1151  /// This transform is defined as semantically independent of the
1152  /// object's inputs. The default implementation applies a follow path
1153  /// object transform, if available.
1154  ///
1155  /// @param context The cook context, which contains the time.
1156  /// @param mat Input and output parameter, that gets premuliplied by
1157  /// the computed input independent transform matrix, if any.
1158  ///
1159  /// @return Returns 1 if the matrix was modified, 0 otherwise
1160  virtual int applyInputIndependentTransform(
1161  OP_Context &context, UT_DMatrix4 &mat);
1162 
1163  /// Computes and pre-multiplies an output transform to the given matrix.
1164  /// The output transform is a transform that a parent specifies for its
1165  /// children. This concept exists for completeness (since there is an input
1166  /// transform), but is not widely used.
1167  /// The default implementation does not apply any transform.
1168  ///
1169  /// @param context The cook context, which contains the time.
1170  /// @param mat Input and output parameters, that gets premultipled
1171  /// by an appropriate output transform, if any.
1172  ///
1173  /// @return Returns 1 if the matrix was modified, 0 otherwise
1174  virtual int applyOutputTransform(OP_Context &context, UT_DMatrix4 &mat);
1175 
1176  /// Premuliplies the pre-transform matrix, myPreTransform, to the given
1177  /// matrix. Pre-matrix is a transformation layer between the input and the
1178  /// parameter transforms, and is used to define the origin point (and
1179  /// orientation) at which zero translation and zero rotation would place the
1180  /// object. This allows to have more meaningull parameter values during
1181  /// animation, where rotation of 0 degrees may need to correspond to a
1182  /// slightly bent limb (ie, rotated joint).
1183  ///
1184  /// @param context The cook context, which contains the time.
1185  /// @param mat The input and output parameter, that gets premultipled
1186  /// by a pre-transform matrix.
1187  ///
1188  /// @return Returns 1 if the matrix was modified, 0 otherwise
1189  virtual int applyPreTransform(OP_Context &context, UT_DMatrix4 &mat);
1190 
1191  bool getParentToWorldTransformForInputNoLock(
1192  OBJ_Node *input, OP_Context &context, UT_DMatrix4 &mat, bool applyInputDependentTransform=true);
1193 
1194  // Methods to obtatin and store transformations in a cache. Also
1195  // check if this object is or should be caching xform
1196  const UT_DMatrix4 & getCachedTransform( OP_Context &context,
1198  OBJ_XformCache::OBJ_LookupStatus &status ) const;
1199  void setCachedTransform( OP_Context &context,
1201  const UT_DMatrix4 &xform ) const;
1202  bool isCachingTransforms(int thread) const;
1203 
1204  virtual bool updateParmsFlags() override;
1205 
1206  /// Used to perform proper dependency tracking when cooking the local
1207  /// transform (myXform) from cookMyObj().
1209  {
1210  public:
1211  LocalCookScope(OP_Context &context, OBJ_Node& obj, bool constraint=false);
1212  ~LocalCookScope();
1213  private:
1214  OP_Context& myContext;
1215  OBJ_Node& myObj;
1216  const bool myWasTimeDep;
1217  const bool myWasCooking;
1218  const bool myConstraint;
1219  };
1220  friend class LocalCookScope;
1221 
1222  //
1223  // The cookMe "caches" information - i.e. the world and local xform matrix
1224  virtual OP_ERROR cookMe(OP_Context &context) override;
1225  virtual OP_ERROR bypassMe(OP_Context &context,
1226  int &copied_input) override;
1227  virtual OP_ERROR cookMyObj(OP_Context &context);
1228 
1229  virtual OP_DataType getCookedDataType() const override;
1230  virtual void deleteCookedData() override;
1231  virtual int saveCookedData(const char *, OP_Context &) override;
1232  virtual int saveCookedData(std::ostream &os,
1233  OP_Context &,
1234  int binary = 0) override;
1235 
1236  virtual const char *getFileExtension(int binary) const override;
1237  virtual OP_ERROR saveIntrinsic(std::ostream &os,
1238  const OP_SaveFlags &flags) override;
1239  virtual void saveIntrinsicCommand(std::ostream &os,
1240  const char *name) override;
1241 
1242  virtual bool loadPacket(UT_IStream &is, short class_id, short sig,
1243  const char *path=0) override;
1244  virtual bool loadPacket(UT_IStream &is, const char *token,
1245  const char *path=0) override;
1246 
1247  virtual void saveFlagsForUndo() override;
1248  virtual void getSaveFlagsString(UT_String &cmd,
1249  const char *flags,
1250  bool save_to_hip) const override;
1251  virtual void getPreParmSaveFlagsString( UT_String &cmd ) const override;
1252  virtual void getPostParmSaveFlagsString( UT_String &cmd ) const override;
1253 
1254  // appends the description of the xform to the text. If the xform is not
1255  // an identity the label is printed first and the rst values follow.
1256  // If the xform is identity the text_if_identity is appended instead
1257  // of the whole label and xform printout
1258  void getXformDescription(const UT_DMatrix4 &xform,
1259  const char* label_if_not_identity,
1260  const char* text_if_identity,
1261  const UT_Vector3R pivot,
1262  const UT_Vector3R pivot_rotate,
1263  const UT_XformOrder order,
1264  UT_WorkBuffer &text);
1265 
1266  // types of transormations that we can clean (i.e.,
1267  // transfer from local to pre-transform)
1269  {
1273  OBJ_TRANSFORM_SCALES
1274  };
1275 
1276 
1277  /// Calculates a matrix that needs to be premultiplied with pretransform
1278  /// to transfer the transformation of type 'type' to the pretransform matrix
1279  void getParmTransformTransferMatrix(
1280  OP_Context &context,
1281  OBJ_TransformComponent type,
1282  UT_DMatrix4 &xform );
1283 
1284  // method for propagating the change in capture transform by xform.
1285  // This method is
1286  // overloaded for OBJs that support capture parameters (e.g., OBJ_Bone)
1287  // in order to adjust their global capture position. This is handy
1288  // when editing the caputre pose and when we need to propagate
1289  // a transofrm (e.g., translation) to all the descendents.
1290  virtual void applyToCaptTransformAndDescendents(
1291  OP_Context &context,
1292  const UT_DMatrix4 &xform );
1293 
1294  // method for building a menu containg point groups
1295  virtual void buildPointGroupMenu(
1296  PRM_Name *menu, int size,
1297  const PRM_SpareData *spare, const PRM_Parm *parm);
1298 
1299  // method for building a menu containg primitive groups
1300  virtual void buildPrimitiveGroupMenu(
1301  PRM_Name *menu, int size,
1302  const PRM_SpareData *spare, const PRM_Parm *parm);
1303 
1304 
1305 //_________________________________________________________________________
1306 //
1307 // Convenience Error methods...
1308 //_________________________________________________________________________
1309 //
1310  void addError(int code, const char *msg = 0)
1311  { UTaddError("OBJ", code, msg);}
1312  void addMessage(OBJ_Error code, const char *msg = 0)
1313  { UTaddMessage("OBJ", code, msg);}
1314  void addWarning(OBJ_Error code, const char *msg = 0)
1315  { UTaddWarning("OBJ", code, msg);}
1316  void addFatal(OBJ_Error code, const char *msg = 0)
1317  { UTaddFatal("OBJ", code, msg);}
1318 
1319 public:
1320 
1321  static PRM_SpareData *getMatchSelectButton(int option, int autoscope);
1322 // TODO: We have to make sure that the parent is cooked here!
1323  virtual OBJ_Node *getParentObject();
1325  { return setInput(0, node); }
1326 
1327  OBJ_Node *getInstanceObject(fpreal now) const;
1328  OBJ_Node *getGeometryInstance(fpreal now) const;
1329  OBJ_Node *getParticleObject(fpreal now) const;
1330 
1331  void setLookAtObject(OBJ_Node *node);
1332  void setLookUpObject(OBJ_Node *node);
1333  void setPathObject(OBJ_Node *node);
1334 
1335 protected:
1337  virtual int collectPropertiesFromChannels(
1338  PI_EditScriptedParms &editparms,
1340  const CH_ChannelList &channels);
1341  virtual int collectPropertiesFromParms(
1342  PI_EditScriptedParms &editparms,
1343  UT_StringArray &names,
1344  PRM_ParmNameMap &nmap);
1345  int collectProperties(PI_EditScriptedParms &editparms,
1347  const CH_ChannelList &channels,
1348  PI_PropertyMap *pmap);
1349  int collectProperties(PI_EditScriptedParms &editparms,
1350  UT_StringArray &names,
1351  PRM_ParmNameMap &nmap,
1352  PI_PropertyMap *pmap);
1353  void createPropertiesShop();
1354 
1355  // Method to find a SHOP node of a specific type. If the type is
1356  // SHOP_INVALID, any SHOP will be returned. Otherwise, the SHOP at the
1357  // given path must be of the correct type. NULL will be returned if the
1358  // type doesn't match or the path isn't found.
1359 
1360  // Used to get pointer to indirection indices for each object type
1361  virtual int *getIndirect() const = 0;
1362 
1364  int name_idx) const
1365  {
1366  int &parm_idx = getIndirect()[name_idx];
1367  if (parm_idx < 0)
1368  parm_idx = getParmList()->getParmIndex(name);
1369  return parm_idx;
1370  }
1372  int name_idx) const
1373  {
1374  int &parm_idx = getIndirect()[name_idx];
1375  if (parm_idx < 0)
1376  parm_idx = getParmList()->getParmIndex(name);
1377  return parm_idx;
1378  }
1379  PRM_Parm *getCachedParm(const UT_StringRef &name, int name_idx)
1380  {
1381  return getParmList()->getParmPtr(
1382  getCachedParmIndex(name, name_idx));
1383  }
1385  const UT_StringRef &name, int name_idx) const
1386  {
1387  return getParmList()->getParmPtr(
1388  getCachedParmIndex(name, name_idx));
1389  }
1390 
1391  virtual bool getTimeOverride() { return false; }
1392 
1393  // inverseDirty is no more needed because setWorldXform does it automatically.
1394  SYS_DEPRECATED_HDK_REPLACE(16.0, "setWorldXform")
1395  void inverseDirty() { myInverseDirty = true; }
1396 
1398  {
1399  if (myInverseDirty)
1400  {
1401  myInverseDirty = false;
1402  myWorldXform.invert(myIWorldXform);
1403  }
1404  return myIWorldXform;
1405  }
1406 
1407  // Compute the object contraints given a local and a parent transform.
1408  // The contraint network is evaluated and given the parent and local_xforms.
1409  // This updates myXform and myWorldXform.
1410  bool computeConstraints(OP_Context &context, const UT_DMatrix4 &parent_xfo);
1411 
1412  // Returns the currently cooked local matrix. Doesn't perform cooking.
1414  { return myXform; }
1415 
1416  // Sets the cooked local matrix during cooking.
1418  { myXform = m; }
1419 
1420  // Returns the currently cooked world matrix. Doesn't perform cooking.
1422  { return myWorldXform; }
1423 
1424  // Sets the cooked world matrix during cooking.
1425  // Also sets the myInverseDirty flag properly.
1427  { myWorldXform = m; myInverseDirty=true; }
1428 
1429 public:
1431  { SET_FLOAT("t", I_T, 0, t, v, add_key) }
1433  { SET_FLOAT("t", I_T, 1, t, v, add_key) }
1435  { SET_FLOAT("t", I_T, 2, t, v, add_key) }
1437  { SET_FLOAT("r", I_R, 0, t, v, add_key) }
1439  { SET_FLOAT("r", I_R, 1, t, v, add_key) }
1441  { SET_FLOAT("r", I_R, 2, t, v, add_key) }
1443  { SET_FLOAT("s", I_S, 0, t, v, add_key) }
1445  { SET_FLOAT("s", I_S, 1, t, v, add_key) }
1447  { SET_FLOAT("s", I_S, 2, t, v, add_key) }
1449  { SET_FLOAT("p", I_P, 0, t, v, add_key) }
1451  { SET_FLOAT("p", I_P, 1, t, v, add_key) }
1453  { SET_FLOAT("p", I_P, 2, t, v, add_key) }
1456  { SET_FLOAT("pr", I_PIVOTR, 0, t, v, add_key) }
1459  { SET_FLOAT("pr", I_PIVOTR, 1, t, v, add_key) }
1462  { SET_FLOAT("pr", I_PIVOTR, 2, t, v, add_key) }
1465  { SET_FLOAT("scale", I_SCALE, 0, t, v, add_key) }
1466 
1467  void setTRANSORDER(int v) { SET_INT("xOrd", I_XORDER, 0, 0, v) }
1468  void setROTORDER(int v) { SET_INT("rOrd", I_RORDER, 0, 0, v) }
1469  void setKEEPPOS(int v) { SET_INT("keeppos", I_KEEPPOS, 0, 0, v) }
1470  void setCHILDCOMP(int v) { SET_INT("childcomp", I_CHILDCOMP, 0, 0, v) }
1471 
1472  int KEEPPOS(fpreal t) const { INT_OBJ_PARM("keeppos", I_KEEPPOS, 0, t) }
1473  int TRS(fpreal t) const { INT_OBJ_PARM("xOrd", I_XORDER, 0, t); }
1474  int XYZ(fpreal t) const { INT_OBJ_PARM("rOrd", I_RORDER, 0, t); }
1475  int CHILDCOMP(fpreal t) const { INT_OBJ_PARM("childcomp", I_CHILDCOMP, 0, t) }
1476 
1477  void T(fpreal *v, fpreal t) { FLOAT_OBJ_PARMS("t", I_T, v, t) }
1478  void R(fpreal *v, fpreal t) { FLOAT_OBJ_PARMS("r", I_R, v, t) }
1479  void S(fpreal *v, fpreal t) { FLOAT_OBJ_PARMS("s", I_S, v, t) }
1480  void P(fpreal *v, fpreal t) { FLOAT_OBJ_PARMS("p", I_P, v, t) }
1481  void PIVOTR(fpreal *v, fpreal t)
1482  { FLOAT_OBJ_PARMS("pr", I_PIVOTR, v, t) }
1483 
1484  fpreal SCALE(fpreal t) { FLOAT_OBJ_PARM("scale", I_SCALE, 0, t) }
1485 
1486  void LOOKUP(UT_String &str, fpreal t)
1487  { STR_OBJ_PARM ("lookup", I_LOOKUP, 0, t) }
1488  // types of allowed path parameterization
1489  // NB: these correspond to the menu entries in thePathParmTypes[]
1491  {
1492  OBJ_PATHPARM_UNIFORM = 0,
1493  OBJ_PATHPARM_ARCLEN
1494  };
1495 
1497  int PATHPARMTYPE(fpreal t) { INT_OBJ_PARM("uparmtype", I_PATHUPARMTYPE,0,t) }
1498  int PATHORIENT(fpreal t) { INT_OBJ_PARM("pathorient", I_PATHORIENT, 0, t) }
1500  void PATHUP(fpreal *v, fpreal t)
1501  { FLOAT_OBJ_PARMS("up", I_PATHUP, v, t) }
1503 
1504  int PICKING() {INT_OBJ_PARM("picking", I_PICKING, 0, 0) }
1506  {STR_OBJ_PARM("pickscript", I_PICKSCRIPT, 0, t)}
1507  int CACHING() {INT_OBJ_PARM("caching", I_CACHING, 0, 0) }
1508 
1509  // This parameter is only important in specific classes, so is not
1510  // defined here at the base level.
1511  virtual int VPORT_SHADEOPEN() { return 0; }
1512  virtual int VPORT_DISPLAYASSUBDIV() { return 0; }
1513 
1514  fpreal SHADERATE(fpreal t, fpreal defval=1);
1515  int PHANTOM(fpreal t, int default_value);
1516  int MATTE(fpreal t, int default_value);
1517  int RAYBOUNCE(fpreal t, int default_value);
1518  int TRANSMITBOUNCE(fpreal t, int default_value);
1519  fpreal RAYCLIP(fpreal t, fpreal def=0.001);
1520  fpreal DISPBOUND(fpreal t, fpreal def=0);
1521  fpreal SHADOWRATE(fpreal t, fpreal def=1);
1522  fpreal REFLRATE(fpreal t, fpreal def=1);
1523  fpreal LOD(fpreal t, fpreal def=1);
1524  void PREINCLUDE(UT_String &str, fpreal t);
1525  void POSTINCLUDE(UT_String &str, fpreal t);
1526  OBJ_MOTIONBLUR_TYPE BLUR(fpreal t,
1528 
1529 
1531  { return evalInt("use_dcolor", &getIndirect()[I_USE_DCOLOR],
1532  0, 0); }
1533  fpreal DCOLORR(fpreal t) { FLOAT_OBJ_PARM("dcolor", I_DCOLOR, 0, t) }
1534  fpreal DCOLORG(fpreal t) { FLOAT_OBJ_PARM("dcolor", I_DCOLOR, 1, t) }
1535  fpreal DCOLORB(fpreal t) { FLOAT_OBJ_PARM("dcolor", I_DCOLOR, 2, t) }
1536 
1538  {
1539  UT_Color col(UT_RGB);
1540  fpreal32 c[3];
1541  evalFloats("dcolor", &getIndirect()[I_DCOLOR], c, t);
1542  col.setRGB(c[0], c[1], c[2]);
1543  return col;
1544  }
1545 
1547  { SET_FLOAT("dcolor", I_DCOLOR, 0, t, r, PRM_AK_MARK_PENDING) }
1549  { SET_FLOAT("dcolor", I_DCOLOR, 1, t, g, PRM_AK_MARK_PENDING) }
1551  { SET_FLOAT("dcolor", I_DCOLOR, 2, t, b, PRM_AK_MARK_PENDING) }
1552 
1553  int DISPLAY(fpreal t) const { INT_OBJ_PARM("display", I_DISPLAY, 0, t) }
1554  int parmIndexDISPLAY() const
1555  { return getCachedParmIndex("display", I_DISPLAY); }
1556 
1557  // Determine whether the geometry is really displayed. If the display
1558  // channel is turned off, then we use the display flag. Use this as opposed
1559  // to isDisplayDisabled() unless you do *not* want to check this object's
1560  // display flag. A network can be specified to ignore the display state
1561  // of any parents starting with that network.
1562  bool getObjectDisplay(fpreal t, const OP_Network *n=0) const
1563  {
1564  return getDisplay() && !isDisplayDisabled(t, n);
1565  }
1566  GEO_ViewportLOD getObjectDisplayStyle(fpreal t,
1567  const OP_Network *net = NULL,
1568  bool ignore_display=false) const;
1569  bool isDisplayTimeDependent() const;
1570 
1571  // Determine whether the geometry is disabled for display. If the display
1572  // channel is turned off, then we use the display flag. A network can be
1573  // specified to ignore the display state of any parents starting with that
1574  // network.
1575  int isDisplayDisabled(fpreal t,
1576  const OP_Network *net = 0) const;
1577 
1578  // setVisible() differs from setDisplay() in that it will try to set the
1579  // display flag on parent subnets and change visible object parameters as
1580  // necessary.
1581  virtual bool setVisible(int onoff) override;
1582  virtual bool getVisible() const override;
1583 
1584  virtual void evaluateBatchParms(PRM_BatchList &list,
1585  fpreal now) override;
1586 
1587  // These parameters are cached
1588 
1589  int TDISPLAY() const
1590  {
1591  return evalInt("tdisplay",
1592  &getIndirect()[I_TDISPLAY], 0, 0);
1593  }
1594  int parmIndexTDISPLAY() const
1595  {
1596  return getCachedParmIndex("tdisplay", I_TDISPLAY);
1597  }
1598 
1600  {
1601  return getCachedParmIndex("constraints_on", I_CONSTRAINTS_ON);
1602  }
1603 
1605  {
1606  return getCachedParmIndex("constraints_path", I_CONSTRAINTS);
1607  }
1608 
1609  int INSTANCE(UT_String &str, fpreal now) const;
1610  int POINTINSTANCE(fpreal now) const;
1611  int PARTICLE(UT_String &s, fpreal t) const;
1612  bool PTMOTIONBLUR(UT_String &str, fpreal now) const;
1613 
1614  int LOOKAT(UT_String &str, fpreal t) const
1615  {
1616  STR_OBJ_PARM ("lookatpath", I_LOOKAT, 0, t)
1617  return str.isstring();
1618  }
1619 
1620  int LOOKUPOBJ(UT_String &str, fpreal t) const
1621  {
1622  STR_OBJ_PARM ("lookupobjpath", I_LOOKUPOBJ, 0, t)
1623  return str.isstring();
1624  }
1625 
1626  int PATHSOP(UT_String &str, fpreal t) const
1627  {
1628  STR_OBJ_PARM ("pathobjpath", I_PATHOBJ, 0, t)
1629  return str.isstring();
1630  }
1631 
1632  // This is used by the viewer to determine whether or not to cook (and show)
1633  // particle guide geometry at the object level.
1635  { return getDefaultedIProperty("vport_promote_popguides", t,1); }
1636 
1637  // This is used by DM_VPortAgent3D to determine what order to
1638  // draw objects in. It itself will set it depending on user defined
1639  // order, so it really is a temporary one-per-object flag.
1640  int getDisplayOrder() const
1641  {
1642  return myDisplayOrder;
1643  }
1644  void setDisplayOrder(int order)
1645  {
1646  myDisplayOrder = order;
1647  }
1648 
1649  // This is used by OBJ_SubNet. This is called on all child objects
1650  // when the Visible Children parameter changes.
1652  { myDisplayDisabledBySubnetNeedsUpdate = 1; }
1653 
1654  void addTransformParmInterests( OP_Node *interested );
1655 
1656  int getDefaultedIProperty(const char *name, fpreal now, int def) const
1657  {
1658  int val;
1659  if (evalParameterOrProperty(name, 0, now, val))
1660  return val;
1661  return def;
1662  }
1663  fpreal getDefaultedFProperty(const char *name, fpreal now, fpreal def) const
1664  {
1665  fpreal val;
1666  if (evalParameterOrProperty(name, 0, now, val))
1667  return val;
1668  return def;
1669  }
1670  const char *getDefaultedSProperty(const char *name, fpreal now,
1671  UT_String &result, const char *def) const
1672  {
1673  if (!evalParameterOrProperty(name, 0, now, result))
1674  result = def;
1675  return result;
1676  }
1677  const char *getDefaultedRawSProperty(const char *name, fpreal now,
1678  UT_String &result, const char *def) const
1679  {
1680  if (!evalParameterOrPropertyRaw(name, 0, now, result))
1681  result = def;
1682  return result;
1683  }
1684 
1685  virtual int64 getMemoryUsage(bool inclusive) const override;
1686 
1687  OP_Node *getEvaluatedConstraints();
1688 
1689  // Evaluate the constraint path parameter and strip the optional channel name.
1690  OP_Node *parseConstraintPath( UT_String &path, UT_String &channel, int add_dep );
1691  OP_Node *parseConstraintPath( UT_String &path, UT_String &channel, int add_dep, bool &got_by_flag );
1692 
1693 protected:
1694  virtual void checkTimeDependencies(int do_parms=1,
1695  int do_inputs=1,
1696  int do_extras=1) override;
1697 private: // methods
1698  friend class OBJ_UndoPreTransform;
1699 
1700  void evalBLUR(UT_String &result, fpreal now);
1701  void checkKeepPosWhenParenting( OBJ_Node *parent_obj );
1702 
1703  const PRM_Parm * findTransformProperty(
1704  fpreal t, const UT_StringRef &name) const;
1705  PRM_Parm * findTransformProperty(
1706  fpreal t, const UT_StringRef &name);
1707 
1708  template <typename OBJ_NODE, typename VISITOR>
1709  static void visitTransformParms(
1710  OBJ_NODE *node,
1711  fpreal t,
1712  bool exclude_uniform_scale,
1713  VISITOR& visitor);
1714 
1715  bool hasTransformParmChannels(
1716  fpreal t,
1717  bool exclude_uniform_scale) const;
1718 
1719  int evalToggleInt(char *togglename, int toggleindirect,
1720  char *parm, int parmindirect,
1721  fpreal t, int def = 0);
1722  fpreal evalToggleFloat(char *togglename, int toggleindirect,
1723  char *parm, int parmindirect,
1724  fpreal t, fpreal defval = 1);
1725  int evalToggleParm(const char *togglename,
1726  const char *token, fpreal now,
1727  int value);
1728  fpreal evalToggleParm(const char *togglename,
1729  const char *token, fpreal now,
1730  fpreal value);
1731 
1732  void computeSubnetParentTransform(
1733  OP_Context &context,
1734  const UT_ValArray<OBJ_Node *> &parentstack,
1735  UT_DMatrix4 &world_xform);
1736 
1737  void addTransformDependencies( OBJ_Node *subnet );
1738 
1739  void propagateKeepPosWhenMoving();
1740 
1741  void dirtyPreTransform();
1742  void updatePreTransformParms( bool from, bool undo=true);
1743  void updatePreTransformParms( bool from, bool undo, fpreal now, int thread);
1744  void getPreTransformParms( OP_Context &ctx, UT_Matrix4D &mat );
1745 
1746  void applyBackwardsRiTransmitCompatibility(
1747  PRM_ParmList *obsolete_parms);
1748 
1749  virtual const char *inputLabel(unsigned) const override;
1750 
1751  void applyLimits( OP_Context &context, fpreal *t, fpreal *r, fpreal *s );
1752  template<int OFFSET>
1753  void applyLimit( OP_Context &context, fpreal *t );
1754 
1755  void onChangeSpareParms();
1756  void cookLocalXform(OP_Context &context, const UT_DMatrix4 &pmat);
1757 
1758  /// Declares that this node's data depends on the @c op for the given
1759  /// reason (OP_INTEREST_DATA, OP_INTEREST_FLAG).
1760  /// This OBJ override also supports OP_INTEREST_INPUT and redirects it to a call to addOpReference()
1761  /// @note There are no other acceptable values for type.
1762  void addExtraObjInput(OP_Node *op, OP_InterestType type);
1763 
1764  /// All OBJ nodes can be a selection owner.
1765  /// This replaces the previous inheritance from SOP_SelectionOwner.
1766  virtual bool isSelectionOwnerType() const final
1767  { return true; }
1768 
1769 private: // data
1770 
1771 
1772  // Pre H16, myWorldXform and myXform used to be protected.
1773  // When cooking a derived OBJ_Node, use setWorldXform and setLocalXform instead.
1774  UT_DMatrix4 myXform; // Transform in parent's space
1775  UT_DMatrix4 myWorldXform; // Transform in world space
1776  UT_DMatrix4 myIWorldXform; // Inverse Xform in world space
1777 
1778  // myPreTransform is right multiplied into the actual parms version of
1779  // the local object transform when we cook.
1780  // ie. myXform includes myPreTransform after being cooked
1781  UT_DMatrix4 myPreTransform;
1782 
1783  OP_Node *myEvaluatedConstraints;
1784 
1785  // Micro-node for determining when myXform is dirty
1786  class obj_XformMicroNode : public OP_DataMicroNode
1787  {
1788  public:
1789  obj_XformMicroNode(OP_Node &node)
1790  : OP_DataMicroNode(node)
1791  {
1792  }
1793  virtual const char *className() const
1794  {
1795  return "obj_XformMicroNode";
1796  }
1797  };
1798  obj_XformMicroNode myXformMicroNode;
1799  int myXformCookLevel;
1800 
1801  DEP_MicroNode myModeMicroNode;
1802 
1803  int myShopMaterialIndex; // Cache of parm index
1804  uint myShopMaterialIndexLastCheck; // Add/remove count
1805 
1806  unsigned myPreTransformIsIdentity:1,
1807  myTraversingForBlur:1,
1808  mySubnetParentTimeDep:1,
1809  myShowingPreTransform:1,
1810  myUpdatingPreTransform:1,
1811  myInverseDirty:1,
1812  myUseFullTransformModel:1,
1813  myCookingRender:1,
1814  myLimitsFlags:18,
1815  myHasLookAt:1,
1816  myHasPath:1,
1817  myHasConstraints:1;
1818 
1819  mutable unsigned myDisplayDisabledBySubnetNeedsUpdate:1,
1820  myDisplayDisabledBySubnet:1,
1821  myInstanceRecursion:1;
1822 
1823  OBJ_NodeFlags myObjFlags;
1824 
1825  // This gets this nodes precedence in display order.
1826  int myDisplayOrder;
1827 
1828  // These variables are for computing the parent xform
1829  UT_ValArray<OP_VERSION> mySubnetParentVersion;
1830  UT_DMatrix4 mySubnetParentTransform;
1831 
1832  enum objLimits
1833  {
1834  MIN_TX = 1<<0,
1835  MIN_TY = 1<<1,
1836  MIN_TZ = 1<<2,
1837  MIN_RX = 1<<3,
1838  MIN_RY = 1<<4,
1839  MIN_RZ = 1<<5,
1840  MIN_SX = 1<<6,
1841  MIN_SY = 1<<7,
1842  MIN_SZ = 1<<8,
1843 
1844  MAX_TX = 1<<9,
1845  MAX_TY = 1<<10,
1846  MAX_TZ = 1<<11,
1847  MAX_RX = 1<<12,
1848  MAX_RY = 1<<13,
1849  MAX_RZ = 1<<14,
1850  MAX_SX = 1<<15,
1851  MAX_SY = 1<<16,
1852  MAX_SZ = 1<<17,
1853  };
1854 
1855  // Pair of Parm* and Long
1856  struct objSpareParam
1857  {
1858  objSpareParam();
1859  objSpareParam( OBJ_Node *obj, const char* name);
1860 
1861  void reset()
1862  {
1863  parm = NULL;
1864  id = -1;
1865  }
1866 
1867  PRM_Parm *parm;
1868  int id;
1869  };
1870  // Struct holding the object spare properties pointers
1871  // for faster access and to only add a pointer to OBJ_Node class.
1872  struct objSpareProperties
1873  {
1874  // returns true if all the Parm pointers are NULL.
1875  // this should be called before disposing of myProperties.
1876  // PLEASE UPDATE when adding new data members
1877  bool isEmpty() const;
1878  void reset();
1879 
1880  // Pre-Transform Category
1881  objSpareParam myPreXOrd;
1882  objSpareParam myPreROrd;
1883  objSpareParam myPreTranslate;
1884  objSpareParam myPreRotate;
1885  objSpareParam myPreScale;
1886 
1887  // Limits Category
1888  objSpareParam myLimitsOn[18];
1889  objSpareParam myLimits[18];
1890 
1891  objSpareParam myParentToBoneTip;
1892  };
1893  objSpareProperties *myProperties;
1894 
1895 private: // static data
1896 
1897  static OBJ_KeepPosType ourKeepPosWhenParenting;
1898  static OBJ_KeepPosType ourKeepPosWhenMoving;
1899  static bool ourAllowKeepPos;
1900  static bool ourIgnorePretransformValue;
1901  static bool ourAllowIgnorePretransform;
1902 };
1903 
1904 inline int
1905 OBJ_Node::getCachable(int thread) const
1906 {
1907  return evalIntT("caching", &getIndirect()[I_CACHING], 0, 0, thread);
1908 }
1909 
1910 inline bool
1912 {
1914 
1915  // the intercept mode is used by some CHOPs to map the current time
1916  // beyond the frame limits. In this case we cannot guarantee that
1917  // caching a matrix at frame, say, 2 and then after one play cycle
1918  // again at frame 2 (which is sort of frame 302) is refering to the
1919  // same xform (assuming 1..300 range). In these situatin we turn off
1920  // caching.
1921  // NB: the intercept mode is entered via SCROLL LOCK key
1922 
1923  return (mode != 1) && getCachable(thread);
1924 }
1925 
1926 #undef FLOAT_OBJ_PARM
1927 #undef FLOAT_OBJ_PARMS
1928 #undef INT_OBJ_PARM
1929 #undef STR_OBJ_PARM
1930 
1931 #undef SET_FLOAT
1932 #undef SET_INT
1933 #undef SET_STRING
1934 
1935 extern "C" {
1937 };
1938 
1940 {
1941 public:
1944 
1945  void addExtraInput( OP_Node *src, OP_InterestType type=OP_INTEREST_DATA);
1946  void addExtraInput( OP_Node *src, int pi, int vi=0 );
1947  void addExtraInput( OP_Node *src, int pi, int vi_start, int vi_end );
1948 
1949  bool hasCaller() const { return myCaller;}
1950 private:
1951  OP_Context &myContext;
1952  OP_ContextData *myCallerUserData;
1953  OP_Node *myCaller;
1954  bool myAddTimeDep;
1955 };
1956 #endif
void setRGB(UT_Vector3F c)
void addWarning(OBJ_Error code, const char *msg=0)
Definition: OBJ_Node.h:1314
UT_DMatrix4 & getPreTransform()
Definition: OBJ_Node.h:677
virtual bool getTimeOverride()
Definition: OBJ_Node.h:1391
void setTX(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1430
virtual OBJ_Bone * castToOBJBone()
Definition: OBJ_Node.h:982
const UT_Matrix4D & getLocalXform() const
Definition: OBJ_Node.h:1413
GT_API const UT_StringHolder selection
#define SET_FLOAT(name, parm_index, vector_index, t, val, add_key)
Definition: OBJ_Node.h:222
virtual bool getParameterOrProperty(const UT_StringRef &name, fpreal now, OP_Node *&op, PRM_Parm *&parm, bool create_missing_multiparms, PRM_ParmList *obsolete=0)
OBJ_SHADER_LOCATION
Definition: OBJ_Node.h:121
virtual bool updateParmsFlags()
PRM_AddKeyType
Definition: PRM_Parm.h:57
int PATHPARMTYPE(fpreal t)
Definition: OBJ_Node.h:1497
OBJ_ParmsStyle
Definition: OBJ_Node.h:205
virtual const OP_DataMicroNode & dataMicroNodeConst() const override
Definition: OBJ_Node.h:1068
DOP_Node * getDisplayDopPtr()
Definition: OBJ_Node.h:697
void R(fpreal *v, fpreal t)
Definition: OBJ_Node.h:1478
virtual OBJ_Sticky * castToOBJSticky()
Definition: OBJ_Node.h:992
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2544
virtual OBJ_DopNet * castToOBJDopNet()
Definition: OBJ_Node.h:984
void T(fpreal *v, fpreal t)
Definition: OBJ_Node.h:1477
#define SYS_DEPRECATED(__V__)
virtual int VPORT_SHADEOPEN()
Definition: OBJ_Node.h:1511
static const char * theChildTableName
Definition: OBJ_Node.h:237
static const char * boundingBoxToken
Definition: OBJ_Node.h:960
Unsorted map container.
Definition: UT_Map.h:83
uint64 OP_VERSION
Definition: OP_Version.h:6
OBJ_TransformComponent
Definition: OBJ_Node.h:1268
virtual int isObjectLitBySubnet(OBJ_Node *, fpreal)
Definition: OBJ_Node.h:942
void setPIVOTRZ(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1460
void setSCALE(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1463
virtual fpreal getH() const
Node position/scale is used by the UI.
void addFatal(OBJ_Error code, const char *msg=0)
Definition: OBJ_Node.h:1316
Definition: OBJ_Node.h:153
void setDCOLORB(fpreal t, fpreal b)
Definition: OBJ_Node.h:1550
const char * getDefaultedSProperty(const char *name, fpreal now, UT_String &result, const char *def) const
Definition: OBJ_Node.h:1670
#define SYS_VISIBILITY_EXPORT
void setIsPreTransformIdentity(int yesno)
Definition: OBJ_Node.h:681
fpreal PATHBANK(fpreal t)
Definition: OBJ_Node.h:1502
int parmIndexCONSTRAINTSPATH() const
Definition: OBJ_Node.h:1604
const GLdouble * v
Definition: glcorearb.h:836
void setSZ(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1446
void setDisplayOrder(int order)
Definition: OBJ_Node.h:1644
int getParentingErrorFlag() const
Definition: OBJ_Node.h:803
static const char * input2ObjectToken
Definition: OBJ_Node.h:963
void P(fpreal *v, fpreal t)
Definition: OBJ_Node.h:1480
virtual OP_OpTypeId getOpTypeID() const =0
virtual bool createSpareParametersForLoad(UT_StringArray &, PRM_ParmNameMap &, UT_String &)
int LOOKAT(UT_String &str, fpreal t) const
Definition: OBJ_Node.h:1614
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
UT_API UT_ErrorSeverity UTaddFatal(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
virtual OBJ_StereoCamera * castToOBJStereoCamera()
Definition: OBJ_Node.h:994
#define SYS_DEPRECATED_HDK_REPLACE(__V__, __R__)
const GLuint GLenum const void * binary
Definition: glcorearb.h:1923
virtual int doDrawLit() const
Definition: OBJ_Node.h:956
GLsizei const GLchar *const * path
Definition: glcorearb.h:3340
bool isCachingTransforms(int thread) const
Definition: OBJ_Node.h:1911
int PICKING()
Definition: OBJ_Node.h:1504
GA_API const UT_StringHolder rot
virtual OBJ_Blend * castToOBJBlend()
Definition: OBJ_Node.h:981
GLboolean GLboolean g
Definition: glcorearb.h:1221
virtual const char * getSetRotateParmName() const
Definition: OBJ_Node.h:929
void setParentingErrorFlag(int o)
Definition: OBJ_Node.h:805
GLint GLuint mask
Definition: glcorearb.h:123
UT_ErrorSeverity
Definition: UT_Error.h:25
GLbitfield flags
Definition: glcorearb.h:1595
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
virtual const char * getSetScaleParmName() const
Definition: OBJ_Node.h:928
Definition: OBJ_Node.h:154
int USE_DCOLOR()
Definition: OBJ_Node.h:1530
int PATHSOP(UT_String &str, fpreal t) const
Definition: OBJ_Node.h:1626
static const char * input3ObjectToken
Definition: OBJ_Node.h:964
int LOOKUPOBJ(UT_String &str, fpreal t) const
Definition: OBJ_Node.h:1620
virtual void getParallelInputs(OP_Context &context, OP_NodeList &nodes) const
virtual int isCookingRender() const override
Definition: OBJ_Node.h:808
static void setGlobalKeepPosWhenParenting(OBJ_KeepPosType flag)
Definition: OBJ_Node.h:850
virtual OBJ_Fog * castToOBJFog()
Definition: OBJ_Node.h:986
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &parms)
int TDISPLAY() const
Definition: OBJ_Node.h:1589
UT_API UT_ErrorSeverity UTaddMessage(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
void PICKSCRIPT(UT_String &str, fpreal t)
Definition: OBJ_Node.h:1505
UT_Color DCOLOR(fpreal t)
Definition: OBJ_Node.h:1537
int XYZ(fpreal t) const
Definition: OBJ_Node.h:1474
virtual int VPORT_DISPLAYASSUBDIV()
Definition: OBJ_Node.h:1512
void setSX(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1442
fpreal getDefaultedFProperty(const char *name, fpreal now, fpreal def) const
Definition: OBJ_Node.h:1663
OBJ_BaseIndex
Definition: OBJ_Node.h:146
static const char * renderSopToken
Definition: OBJ_Node.h:959
GLsizeiptr size
Definition: glcorearb.h:663
void S(fpreal *v, fpreal t)
Definition: OBJ_Node.h:1479
static const char * displaySopToken
Definition: OBJ_Node.h:958
SOP_Node * getDisplaySopPtr()
Definition: OBJ_Node.h:693
png_infop png_bytep * trans
Definition: png.h:2520
OBJ_VariableId
Definition: OBJ_Node.h:189
const char * getDefaultedRawSProperty(const char *name, fpreal now, UT_String &result, const char *def) const
Definition: OBJ_Node.h:1677
GLuint id
Definition: glcorearb.h:654
virtual void opChanged(OP_EventType reason, void *data=0)
long long int64
Definition: SYS_Types.h:107
#define FLOAT_OBJ_PARMS(name, idx, v, t)
Definition: OBJ_Node.h:216
GLdouble n
Definition: glcorearb.h:2007
obj_PathParmType
Definition: OBJ_Node.h:1490
static void setGlobalKeepPosWhenMoving(OBJ_KeepPosType flag)
Definition: OBJ_Node.h:855
virtual const char * getOpType() const =0
virtual bool isLightInLightMask(const OBJ_Node *light, fpreal now)
Function to resolve lighting based on light masks.
Definition: OBJ_Node.h:938
virtual const OP_DataMicroNode & parmListMicroNodeConst() const
Definition: OP_Node.h:1543
OP_InterestType
Definition: OP_DataTypes.h:45
obj_OnionSkin
Definition: OBJ_Node.h:711
int KEEPPOS(fpreal t) const
Definition: OBJ_Node.h:1472
virtual int * getIndirect() const =0
fpreal DCOLORR(fpreal t)
Definition: OBJ_Node.h:1533
void PIVOTR(fpreal *v, fpreal t)
Definition: OBJ_Node.h:1481
Definition: OBJ_Node.h:152
int TRS(fpreal t) const
Definition: OBJ_Node.h:1473
virtual int getPickable()
Definition: OP_Node.h:1297
void setDCOLORR(fpreal t, fpreal r)
Definition: OBJ_Node.h:1546
virtual int setPickable(int on_off)
Definition: OP_Node.h:1254
void LOOKUP(UT_String &str, fpreal t)
Definition: OBJ_Node.h:1486
virtual OP_ERROR setInput(unsigned idx, OP_Node *op, unsigned outputIdx=0)
Sets a given input to connect to an output of a particular node.
const std::enable_if<!VecTraits< T >::IsVec, T >::type & max(const T &a, const T &b)
Definition: Composite.h:133
OBJ_Error
Definition: OBJ_Error.h:15
virtual bool evalVariableValue(UT_String &val, int index, int thread) override
Definition: OBJ_Node.h:247
#define SET_INT(name, parm_index, vector_index, t, val)
Definition: OBJ_Node.h:224
int getInterceptMode() const
Definition: UT_Playback.h:79
int getCachedParmIndex(const UT_StringRef &name, int name_idx) const
Definition: OBJ_Node.h:1363
virtual OP_ERROR setNamedInput(const OP_ConnectorId &input_name, OP_Node *op, const OP_ConnectorId *output_name=nullptr)
New input functions that use names instead of indices.
static OBJ_KeepPosType getGlobalKeepPosWhenMoving()
Definition: OBJ_Node.h:857
int getCachedParmIndex(const PRM_Name &name, int name_idx) const
Definition: OBJ_Node.h:1371
virtual bool getHideDefaultParms() const
Definition: OBJ_Node.h:1055
void addError(int code, const char *msg=0)
Definition: OBJ_Node.h:1310
void setTY(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1432
int PATHORIENT(fpreal t)
Definition: OBJ_Node.h:1498
void setSY(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1444
OBJ_KeepPosType
Definition: OBJ_Node.h:196
int parmIndexDISPLAY() const
Definition: OBJ_Node.h:1554
virtual const char * getSetTranslateParmName() const
Definition: OBJ_Node.h:930
SYS_VISIBILITY_EXPORT void newObjectOperator(OP_OperatorTable *table)
Definition: OBJ_Lamp.C:40
fpreal PATHROLL(fpreal t)
Definition: OBJ_Node.h:1499
virtual OBJ_Ambient * castToOBJAmbient()
Definition: OBJ_Node.h:980
int parmIndexTDISPLAY() const
Definition: OBJ_Node.h:1594
void addMessage(OBJ_Error code, const char *msg=0)
Definition: OBJ_Node.h:1312
#define FLOAT_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Node.h:214
#define INT_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Node.h:218
int PROMOTE_POPGUIDES(fpreal t) const
Definition: OBJ_Node.h:1634
virtual fpreal getW() const
Node position/scale is used by the UI.
OP_OpTypeId
Definition: OP_OpTypeId.h:15
void setLocalXform(const UT_Matrix4D &m)
Definition: OBJ_Node.h:1417
virtual OBJ_Camera * castToOBJCamera()
Definition: OBJ_Node.h:983
virtual OP_Node * getRenderNodePtr()
static void setIgnorePretransformValue(bool flag)
Definition: OBJ_Node.h:866
bool hasConstraints() const
Definition: OBJ_Node.h:1093
virtual bool getParameterOrPropertyByChannel(const UT_StringRef &chname, fpreal now, OP_Node *&op, PRM_Parm *&parm, int &vector_index, PRM_ParmList *obsolete=0)
virtual OBJ_SubNet * castToOBJSubNet()
Definition: OBJ_Node.h:993
GLboolean * data
Definition: glcorearb.h:130
void setCHILDCOMP(int v)
Definition: OBJ_Node.h:1470
GLuint const GLchar * name
Definition: glcorearb.h:785
void setTZ(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1434
GLsizei const GLchar *const * strings
Definition: glcorearb.h:1932
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
static bool getIgnorePretransform()
Definition: OBJ_Node.h:868
virtual const OP_DataMicroNode & dataMicroNodeConst() const
Definition: OP_Node.h:1532
virtual bool getBoundingBox(UT_BoundingBox &box, OP_Context &)
void setROTORDER(int v)
Definition: OBJ_Node.h:1468
int CHILDCOMP(fpreal t) const
Definition: OBJ_Node.h:1475
fpreal DCOLORB(fpreal t)
Definition: OBJ_Node.h:1535
unsigned int uint
Definition: SYS_Types.h:40
OBJ_UIChangeType
Definition: OBJ_Node.h:129
static const char * input4ObjectToken
Definition: OBJ_Node.h:965
const UT_Matrix4D & getWorldXform() const
Definition: OBJ_Node.h:1421
int getCachable(int thread) const
Definition: OBJ_Node.h:1905
virtual int getDisplayOrigin() const
Definition: OP_Node.h:1305
bool getObjectDisplay(fpreal t, const OP_Network *n=0) const
Definition: OBJ_Node.h:1562
GLenum mode
Definition: glcorearb.h:98
virtual const OP_DataMicroNode & parmListMicroNodeConst() const override
Definition: OBJ_Node.h:1061
virtual OP_ERROR setNamedIndirectInput(const OP_ConnectorId &input_name, OP_IndirectInput *input)
virtual bool createSpareParametersFromChannels(UT_BitArray &selection, const CH_ChannelList &channels)
int CACHING()
Definition: OBJ_Node.h:1507
virtual OBJ_Light * castToOBJLight()
Definition: OBJ_Node.h:989
fpreal PATHPOS(fpreal t)
Definition: OBJ_Node.h:1496
virtual OP_ERROR setNamedInputReference(const OP_ConnectorId &input_name, const char *label, int, const OP_ConnectorId *output_name=nullptr)
virtual void getDragDropChoice(DD_Source &src, DD_ChoiceList &c)
int isPreTransformIdentity()
Definition: OBJ_Node.h:679
virtual const char * getChildType() const
#define STR_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Node.h:220
virtual int testDragDrop(DD_Source &src)
GLuint shader
Definition: glcorearb.h:784
GLsizei const GLfloat * value
Definition: glcorearb.h:823
double fpreal
Definition: SYS_Types.h:270
A map of string to various well defined value types.
Definition: UT_Options.h:42
void setWorldXform(const UT_Matrix4D &m)
Definition: OBJ_Node.h:1426
void setRY(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1438
virtual int findParametersOrProperties(fpreal now, OP_PropertyLookupList &list)
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
void PATHUP(fpreal *v, fpreal t)
Definition: OBJ_Node.h:1500
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms)
virtual bool canCreateNewOpType() const
int DISPLAY(fpreal t) const
Definition: OBJ_Node.h:1553
PRM_Parm * getCachedParm(const UT_StringRef &name, int name_idx)
Definition: OBJ_Node.h:1379
static OBJ_KeepPosType getGlobalKeepPosWhenParenting()
Definition: OBJ_Node.h:852
int getDisplayOrder() const
Definition: OBJ_Node.h:1640
static UT_Playback * getPlayback()
GEO_ViewportLOD
virtual int isObjectLitBy(OBJ_Node *, fpreal)
Definition: OBJ_Node.h:936
GA_API const UT_StringHolder up
virtual void resolveObsoleteParms(PRM_ParmList *)
OP_VERSION modVersion() const
exint evalIntT(int pi, int vi, fpreal t, int thread) const
SOP_Node * getRenderSopPtr()
Definition: OBJ_Node.h:695
virtual OP_ERROR setIndirectInput(unsigned idx, OP_IndirectInput *input)
Connects an input to an indirect input of our parent subnet.
bool isUseFullTransformModel() const
Definition: OBJ_Node.h:309
virtual OBJ_Rivet * castToOBJRivet()
Definition: OBJ_Node.h:991
OBJ_MatchTransform
Definition: OBJ_Node.h:135
void setPIVOTRY(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1457
virtual int setFlag(char tag, int on_off)
GLuint index
Definition: glcorearb.h:785
virtual int setDisplayOrigin(int on_off_unchanged)
Definition: OP_Node.h:1262
int getDefaultedIProperty(const char *name, fpreal now, int def) const
Definition: OBJ_Node.h:1656
virtual void referencedParmChanged(int pi)
UT_API UT_ErrorSeverity UTaddWarning(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
int parmIndexCONSTRAINTSON() const
Definition: OBJ_Node.h:1599
GLuint GLfloat * val
Definition: glcorearb.h:1607
OP_EventType
Definition: OP_Value.h:22
void setRZ(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1440
GA_API const UT_StringHolder pivot
OP_DataType
Definition: OP_DataTypes.h:28
virtual OP_OpTypeId getChildTypeID() const =0
virtual OBJ_Handle * castToOBJHandle()
Definition: OBJ_Node.h:988
int invert(T tol=0.0F)
Invert this matrix and return 0 if OK, 1 if singular.
void setTRANSORDER(int v)
Definition: OBJ_Node.h:1467
virtual bool evalVariableValue(UT_String &val, int index, int thread)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
bool isstring() const
Definition: UT_String.h:689
OBJ_MOTIONBLUR_TYPE
Definition: OBJ_Node.h:113
virtual OBJ_Fetch * castToOBJFetch()
Definition: OBJ_Node.h:985
const UT_DMatrix4 & getInverseXform()
Definition: OBJ_Node.h:1397
This is the base class for all DOP nodes.
Definition: DOP_Node.h:75
static bool getIgnorePretransformValue()
Definition: OBJ_Node.h:871
void setPX(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1448
void setPZ(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1452
GLboolean r
Definition: glcorearb.h:1221
#define const
Definition: zconf.h:214
virtual void propagateEndBlockModify()
void setRX(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1436
png_infop png_uint_32 flag
Definition: png.h:2242
#define OBJ_API
Definition: OBJ_API.h:10
fpreal SCALE(fpreal t)
Definition: OBJ_Node.h:1484
OP_VERSION parmListModVersion() const
Definition: OBJ_Node.h:1063
void setPY(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1450
virtual OBJ_Null * castToOBJNull()
Definition: OBJ_Node.h:990
OBJ_NodeFlags & objflags()
Definition: OBJ_Node.h:814
float fpreal32
Definition: SYS_Types.h:191
void setDCOLORG(fpreal t, fpreal g)
Definition: OBJ_Node.h:1548
virtual void setCookingRender(int val) override
Definition: OBJ_Node.h:811
void setPIVOTRX(fpreal t, fpreal v, PRM_AddKeyType add_key=PRM_AK_MARK_PENDING)
Definition: OBJ_Node.h:1454
static const char * boundingSphereToken
Definition: OBJ_Node.h:961
virtual int acceptDragDrop(DD_Source &src, const char *label)
Definition: OBJ_Node.h:151
virtual OBJ_Geometry * castToOBJGeometry()
Definition: OBJ_Node.h:987
static const char * input1ObjectToken
Definition: OBJ_Node.h:962
virtual OP_Node * getDisplayNodePtr()
fpreal DCOLORG(fpreal t)
Definition: OBJ_Node.h:1534
OP_ERROR setParentObject(OBJ_Node *node)
Definition: OBJ_Node.h:1324
UT_API UT_ErrorSeverity UTaddError(const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0)
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:71
const PRM_Parm * getCachedParm(const UT_StringRef &name, int name_idx) const
Definition: OBJ_Node.h:1384
virtual obj_OnionSkin getOnionSkin()
Definition: OBJ_Node.h:717
void setKEEPPOS(int v)
Definition: OBJ_Node.h:1469
void setDisplayDisabledBySubnetNeedsUpdate()
Definition: OBJ_Node.h:1651
GLenum src
Definition: glcorearb.h:1792
virtual OP_ERROR setInputReference(unsigned idx, const char *label, int keeppos, unsigned outputIdx=0)
Connects an input to particular node by name in the network.