stopped
If you also delete these particles or somehow ignore them during simulation, simulation can't be simulated properly.
stopped
currentNode = hou.node("..") inputs = currentNode.inputs() if None in inputs: index = 0 for input in inputs: try: currentNode.setInput(index, None) except: pass index += 1 index = 0 for input in inputs: if input != None: currentNode.setInput(index, input) index += 1
mihatsu
Thanks I got it almost work. Only problem is that since i use meta data for iteration, it can skip some point groups because point numbers change when points are removed. Can i keep remaining point numbers same even i remove other points or how i can handle this?
ysysimonYes!
So only code that needs to perform operations on each point will loop through all points?
malbrecht
Hi,
the one thing popping out immediately is:The kit Desktop Qt 5.14.1 MSVC2017 64bit has configuration issues which might be the root cause for this problem
Obviously, if you create the missing object (a CMD_Manager) yourself, the missing object from a *.lib won't matter, but you don't know if the object is getting filled (e.g. from an overloaded instance), so if your compiled version with the “hack” doesn't work, you might need to check what else gets linked in by default when you use hcustom. Docs say, that “-e” lists the current configuration:-e Echo the compiler and linker commands run by this script.(this is for hcustom), maybe you give that a try and check if you are missing a static .lib that would normally be linked?
But, again, my suspicion would be that something about your Qt config is different to what hcustom uses …
Apologies for not being able to pinpoint it, consider my response “moral support” :-)
Marc
# Specify the minimum required version of CMake to build the project.
cmake_minimum_required( VERSION 3.6 )
project( My_HDK_Project )
list( APPEND CMAKE_PREFIX_PATH "E:/Softwares/Houdini/toolkit/cmake" )
find_package( Houdini REQUIRED )
# Add a library with two source files.
set( library_name CMD )
add_library( ${PROJECT_NAME} SHARED
command.C
)
target_link_libraries(${PROJECT_NAME} Houdini )
houdini_configure_target(${PROJECT_NAME})
malbrecht
Hi, guy,
without having tried this one myself, experience says that MS tools tend to have some machine selection (x86 vs. x64 etc) set wrongly when using cmake (without paying EXTREME caution to all options).
Also, make sure you're not mixing debug and release versions (another “goodie” that I encounter every other compile run).
Maybe this helps?
Marc
# Specify the minimum required version of CMake to build the project.
cmake_minimum_required( VERSION 3.6 )
project( My_HDK_Project )
list( APPEND CMAKE_PREFIX_PATH "E:/Softwares/Houdini/toolkit/cmake" )
find_package( Houdini REQUIRED )
# Add a library with two source files.
set( library_name CMD )
add_library( ${library_name} SHARED
command.C
)
target_link_libraries( ${library_name} Houdini )
houdini_configure_target( ${library_name})
/* * Copyright (c) 2020 * Side Effects Software Inc. All rights reserved. * * Redistribution and use of Houdini Development Kit samples in source and * binary forms, with or without modification, are permitted provided that the * following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. The name of Side Effects Software may not be used to endorse or * promote products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE `AS IS' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *---------------------------------------------------------------------------- */ #include <string.h> #include <malloc.h> #include <math.h> #include <UT/UT_DSOVersion.h> #include <CMD/CMD_Args.h> #include <CMD/CMD_Manager.h> // NOTE: Please consider extending HOM rather than hscript static void cmd_args(CMD_Args &args) { // Command callback int i; if (args.found('e')) { args.err() << "Found -e option with: " << args.argp('e') << "\n"; args.showUsage(); } else { args.out() << "Arguments:\n"; for (i = 1; i < args.argc(); i++) args.out() << i << ": " << args(i) << "\n"; } } void CMDextendLibrary(CMD_Manager *cman) { // Extend the hscript command language by adding a simple command which // prints the arguments. cman->installCommand("args", "e:", cmd_args); }
-- The C compiler identification is MSVC 19.16.27035.0
-- The CXX compiler identification is MSVC 19.16.27035.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
QT_QMAKE_EXECUTABLE
-- Build files have been written to: C:/Users/Nima Nolan/Desktop/HDK Sample/build-HDK-Desktop_Qt_5_14_1_MSVC2017_64bit-Release
15:49:59: Running steps for project My_HDK_Project...
15:49:59: Starting: "E:\Softwares\CMake\bin\cmake.exe" --build . --target all
[1/2 0.1/sec] Building CXX object CMakeFiles\CMD.dir\command.C.obj
cl : Command line warning D9025 : overriding '/W3' with '/W1'
[2/2 0.2/sec] Linking CXX shared library "C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.dll"
FAILED: C:/Users/Nima Nolan/Documents/houdini18.0/dso/CMD.dll C:/Users/Nima Nolan/Documents/houdini18.0/dso/CMD.lib
cmd.exe /C "cd . && E:\Softwares\CMake\bin\cmake.exe -E vs_link_dll --intdir=CMakeFiles\CMD.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100177~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100177~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~1\2017\BUILDT~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\CMD.rsp /out:"C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.dll" /implib:"C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.lib" /pdb:"C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.pdb" /dll /version:0.0 /machine:x64 /INCREMENTAL:NO && cd ."
LINK: command "C:\PROGRA~2\MICROS~1\2017\BUILDT~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\CMD.rsp /out:C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.dll /implib:C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.lib /pdb:C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.dll.manifest" failed (exit code 1120) with the following output:
Creating library C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.lib and object C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.exp
command.C.obj : error LNK2019: unresolved external symbol "private: static class CMD_Manager * CMD_Manager::theManager" (?theManager@CMD_Manager@@0PEAV1@EA) referenced in function "public: static class CMD_Manager * __cdecl CMD_Manager::getContext(void)" (?getContext@CMD_Manager@@SAPEAV1@XZ)
C:\Users\Nima Nolan\Documents\houdini18.0\dso\CMD.dll : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.
15:50:12: The process "E:\Softwares\CMake\bin\cmake.exe" exited with code 1.
Error while building/deploying project My_HDK_Project (kit: Desktop Qt 5.14.1 MSVC2017 64bit)
The kit Desktop Qt 5.14.1 MSVC2017 64bit has configuration issues which might be the root cause for this problem.
When executing step "CMake Build"
15:50:12: Elapsed time: 00:13.
I'm using Qt Creator as an IDE for doing this.CMD_Manager* CMD_Manager::theManager = nullptr;
command.C.obj:-1: error: LNK2019: unresolved external symbol “private: static class CMD_Manager * CMD_Manager::theManager” (?theManager@CMD_Manager@@0PEAV1@EA) referenced in function “public: static class CMD_Manager * __cdecl CMD_Manager::getContext(void)” (?getContext@CMD_Manager@@SAPEAV1@XZ)I use Microsoft Build Tools 2017 v 15.9.18 and CMake as build system generator.
DmitriiP
what is the “:” after the letter? why with “eeeee:” just breaking everything?
why in this example “1” not “1:”?
http://www.sidefx.com/docs/hdk/_f_s_2_f_s__background_8_c-example.html#a33 [www.sidefx.com]
and so on ….
this is not “really good” documentation, just simple description…
If the letter is followed by a colon, the option is expected to have an argument (use two or three colons to indicate two or three arguments respectively).