Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About daniel.fodor

  • Rank

Personal Information

  • Name
    Daniel Fodor
  • Location
  1. PRM_TOGGLE help

    Thank you Symek, that fixed the crash! Although the checkbox doesn't do anything(I tried to translate some points if it's checked) Any ideas on that?
  2. PRM_TOGGLE help

    Hi! Sorry if this is a basic question, I am very new to HDK and Houdini itself, I am starting to get the taste of it but I have some questions: I want to create a custom SOP with a "built-in" switcher, here is my code: //I tried to copy from the euclid/SOP_Euclid example, I have this func in my header(this should ask houdini if the checkbox is ticked): bool SWITCH(fpreal t) { return (bool)evalInt(0, 0, t); } ... //Here I set up the Toggle param static PRM_Name names[] = { PRM_Name("switch","Switch"), }; static PRM_Default elevationDefault(500.0); PRM_Template MySOP::myTemplateList[] = { PRM_Template(PRM_STRING, 1, &PRMgroupName, 0, &SOP_Node::pointGroupMenu, 0, 0, SOP_Node::getGroupSelectButton(GA_GROUP_POINT)), PRM_Template(PRM_TOGGLE, 1, &names[1]), PRM_Template(), }; ... OP_ERROR MySOP::cookMySop(OP_Context& context) { OP_AutoLockInputs inputs(this); if (inputs.lock(context) >= UT_ERROR_ABORT) { return error(); } fpreal t = context.getTime(); bool switcher = SWITCH(t); //Do something with my object... //Then here i want to make the switcher, my first idea was to make a PRM_TOGGLE param, and using it as a bool(like in the Euclid e.g), //so for example if it's ticked, I want to move my object, if it isn't, I want to make it bigger (I know its a bad e.g: but I hope you get it) if(switcher) { //move my object } else { //make it bigger } //continue It compiles, but crashes Houdini with a seg. fault and I don't know what is the problem Also, let me know if there is a better way of making a switcher Daniel