00001 /* 00002 * Copyright (c) 2013 00003 * Side Effects Software Inc. All rights reserved. 00004 * 00005 * Redistribution and use of Houdini Development Kit samples in source and 00006 * binary forms, with or without modification, are permitted provided that the 00007 * following conditions are met: 00008 * 1. Redistributions of source code must retain the above copyright notice, 00009 * this list of conditions and the following disclaimer. 00010 * 2. The name of Side Effects Software may not be used to endorse or 00011 * promote products derived from this software without specific prior 00012 * written permission. 00013 * 00014 * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE `AS IS' AND ANY EXPRESS 00015 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00016 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 00017 * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 00018 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00019 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00020 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00021 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00022 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00023 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00024 * 00025 *---------------------------------------------------------------------------- 00026 * GroupRename SOP 00027 */ 00028 00029 00030 #ifndef __SOP_GroupRename_h__ 00031 #define __SOP_GroupRename_h__ 00032 00033 #include <SOP/SOP_Node.h> 00034 00035 namespace HDK_Sample { 00036 class SOP_GroupRename : public SOP_Node 00037 { 00038 public: 00039 SOP_GroupRename(OP_Network *net, const char *name, OP_Operator *op); 00040 virtual ~SOP_GroupRename(); 00041 00042 // This method is created so that it can be called by handles. It only 00043 // cooks the input group of this SOP. The geometry in this group is 00044 // the only geometry manipulated by this SOP. 00045 virtual OP_ERROR cookInputGroups(OP_Context &context, 00046 int alone = 0); 00047 00048 static PRM_Template myTemplateList[]; 00049 static OP_Node *myConstructor(OP_Network*, const char *, 00050 OP_Operator *); 00051 00052 protected: 00053 virtual unsigned disableParms(); 00054 virtual const char *inputLabel(unsigned idx) const; 00055 00056 // Method to cook geometry for the SOP 00057 virtual OP_ERROR cookMySop(OP_Context &context); 00058 00059 private: 00060 void OLDNAME(UT_String &str, float t) { evalString(str, "oldname", 0, t); } 00061 void NEWNAME(UT_String &str, float t) { evalString(str, "newname", 0, t); } 00062 }; 00063 } // End HDK_Sample namespace 00064 00065 #endif
1.5.9