Skip to content

Instantly share code, notes, and snippets.

#define NOMINMAX
#include "classTest.h"
#include <iostream>
#include <string>
#include <vector>
using namespace std;
void
#define NOMINMAX
#include "classTest.h"
#include <iostream>
#include <string>
using namespace std;
void
ClassTest::getRecursiveNode(FbxNode* pNode, FbxArray<FbxNode*>& nodeArray) {
void getAssignMaterials(FbxMesh *pMesh)
{
//参考: https://github.com/cyrillef/FBX-iOS-ImportScene/blob/master/ImportScene/DisplayMesh.cxx
// MaterialAssignが1Mesh1Materialかどうかチェック
bool isAllSame = true;
for (int l = 0; l < pMesh->GetElementMaterialCount(); l++){
FbxGeometryElementMaterial *matElement = pMesh->GetElementMaterial(l);
if (matElement->GetMappingMode() == FbxGeometryElement::eByPolygon)
{
// 参照渡しで指定ノード以下のTreeをnodeArrayに取得
void Test(FbxNode *pNode, FbxArray<FbxNode *> &nodeArray)
{
nodeArray.Add(pNode);
int childNodeNum = pNode->GetChildCount();
for (int i = 0; i < childNodeNum; i++)
{
FbxNode *pChild = pNode->GetChild(i);
Test(pChild,nodeArray);
}
// 参照渡しで指定ノード以下のTreeをnodeArrayに取得
void Test(FbxNode *pNode, FbxArray<FbxNode *> &nodeArray)
{
nodeArray.Add(pNode);
printNode(pNode);
int childNodeNum = pNode->GetChildCount();
for (int i = 0; i < childNodeNum; i++)
{
FbxNode *pChild = pNode->GetChild(i);
Test(pChild,nodeArray);
#include <iostream>
using namespace std;
void pointerTest_01()
{
int hoge = 10;
int& refHoge = hoge; // hogのの参照
int* pHoge = &hoge; // 初期化
refHoge = 20;
#include "fbxsdk.h"
#include <iostream>
using namespace std;
template<typename TYPE>
void printNode(TYPE *pNode)
{
const char *nodeName = pNode->GetName();
cout << nodeName << endl;
}
void RecursiveNode(FbxNode *pNode)
{
int childNodeNum = pNode->GetChildCount();
for (int i = 0; i < childNodeNum; i++)
{
FbxNode *pChild = pNode->GetChild(i);
RecursiveNode(pChild);
}
}
#define NOMINMAX
#include <pxr/base/vt/array.h>
#include <pxr/base/gf/vec3f.h>
#include <pxr/base/vt/value.h>
#include <pxr/base/tf/token.h>
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usdGeom/mesh.h>
#include <pxr/usd/sdf/path.h>
# -*- coding: utf-8 -*-
import sys
import os.path
import re
from PySide2.QtWidgets import (QApplication,
QDialog,
QTreeView,
QAbstractItemView,
QVBoxLayout,