Skip to content

Commit e23f0f9

Browse files
committed
2023.2.0 Release
Added an example of how to work with OCIO as a renderer in plugins\example.image\source\examples_ocio.cpp
1 parent 4c750e6 commit e23f0f9

18 files changed

Lines changed: 371 additions & 117 deletions

plugins/cinema4dsdk/res/nodes/net.maxonexample.databases.customgui.db.en-US.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,25 @@
164164
"net.maxon.description.base.command",
165165
{
166166
"dataType": "net.maxon.datatype.id",
167-
"content": "attribute"
167+
"content": "group"
168168
},
169169
"net.maxon.description.base.identifier",
170170
{
171171
"dataType": "net.maxon.datatype.internedid",
172-
"content": "dotdata"
172+
"content": "net.maxon.node.base.group.outputs"
173+
},
174+
"net.maxon.description.data.base.includedfrom",
175+
{
176+
"dataType": "(net.maxon.datatype.id,net.maxon.datatype.internedid)",
177+
"content": {
178+
"_0": "net.maxon.node.base",
179+
"_1": "net.maxon.node.base"
180+
}
173181
},
174182
"net.maxon.description.string.base.translatedstring",
175183
{
176184
"dataType": "net.maxon.interface.string-C",
177-
"content": "Dot Data Input"
185+
"content": "Outputs"
178186
}
179187
]
180188
}
@@ -193,7 +201,7 @@
193201
"net.maxon.description.base.identifier",
194202
{
195203
"dataType": "net.maxon.datatype.internedid",
196-
"content": "net.maxon.node.base.group.outputs"
204+
"content": "net.maxon.node.base.group.object"
197205
},
198206
"net.maxon.description.data.base.includedfrom",
199207
{
@@ -206,7 +214,7 @@
206214
"net.maxon.description.string.base.translatedstring",
207215
{
208216
"dataType": "net.maxon.interface.string-C",
209-
"content": "Outputs"
217+
"content": "Object"
210218
}
211219
]
212220
}
@@ -225,12 +233,12 @@
225233
"net.maxon.description.base.identifier",
226234
{
227235
"dataType": "net.maxon.datatype.internedid",
228-
"content": "result"
236+
"content": "dotdata"
229237
},
230238
"net.maxon.description.string.base.translatedstring",
231239
{
232240
"dataType": "net.maxon.interface.string-C",
233-
"content": "Result"
241+
"content": "Dot Data Input"
234242
}
235243
]
236244
}
@@ -244,25 +252,17 @@
244252
"net.maxon.description.base.command",
245253
{
246254
"dataType": "net.maxon.datatype.id",
247-
"content": "group"
255+
"content": "attribute"
248256
},
249257
"net.maxon.description.base.identifier",
250258
{
251259
"dataType": "net.maxon.datatype.internedid",
252-
"content": "net.maxon.node.base.group.object"
253-
},
254-
"net.maxon.description.data.base.includedfrom",
255-
{
256-
"dataType": "(net.maxon.datatype.id,net.maxon.datatype.internedid)",
257-
"content": {
258-
"_0": "net.maxon.node.base",
259-
"_1": "net.maxon.node.base"
260-
}
260+
"content": "result"
261261
},
262262
"net.maxon.description.string.base.translatedstring",
263263
{
264264
"dataType": "net.maxon.interface.string-C",
265-
"content": "Object"
265+
"content": "Result"
266266
}
267267
]
268268
}

plugins/cinema4dsdk/res/nodes/net.maxonexample.databases.customgui.db.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -312,22 +312,30 @@
312312
"net.maxon.description.base.command",
313313
{
314314
"dataType": "net.maxon.datatype.id",
315-
"content": "attribute"
315+
"content": "group"
316316
},
317317
"net.maxon.description.base.identifier",
318318
{
319319
"dataType": "net.maxon.datatype.internedid",
320-
"content": "dotdata"
320+
"content": "net.maxon.node.base.group.outputs"
321321
},
322-
"net.maxon.description.ui.base.groupid",
322+
"net.maxon.description.data.base.includedfrom",
323323
{
324-
"dataType": "net.maxon.datatype.internedid",
325-
"content": "net.maxon.node.base.group.inputs"
324+
"dataType": "(net.maxon.datatype.id,net.maxon.datatype.internedid)",
325+
"content": {
326+
"_0": "net.maxon.node.base",
327+
"_1": "dotdata.IJb7_vJ2MdpurOGY2ESr1L"
328+
}
326329
},
327-
"net.maxon.description.ui.base.guitypeid",
330+
"net.maxon.description.ui.base.defaultclassification",
328331
{
329332
"dataType": "net.maxon.datatype.id",
330-
"content": "net.maxonsdk.ui.dotdataconversion"
333+
"content": "output"
334+
},
335+
"net.maxon.description.ui.base.groupdefaultopen",
336+
{
337+
"dataType": "bool",
338+
"content": true
331339
}
332340
]
333341
}
@@ -346,7 +354,7 @@
346354
"net.maxon.description.base.identifier",
347355
{
348356
"dataType": "net.maxon.datatype.internedid",
349-
"content": "net.maxon.node.base.group.outputs"
357+
"content": "net.maxon.node.base.group.object"
350358
},
351359
"net.maxon.description.data.base.includedfrom",
352360
{
@@ -359,12 +367,17 @@
359367
"net.maxon.description.ui.base.defaultclassification",
360368
{
361369
"dataType": "net.maxon.datatype.id",
362-
"content": "output"
370+
"content": "input"
363371
},
364372
"net.maxon.description.ui.base.groupdefaultopen",
365373
{
366374
"dataType": "bool",
367375
"content": true
376+
},
377+
"net.maxon.description.ui.base.groupid",
378+
{
379+
"dataType": "net.maxon.datatype.internedid",
380+
"content": ""
368381
}
369382
]
370383
}
@@ -383,12 +396,12 @@
383396
"net.maxon.description.base.identifier",
384397
{
385398
"dataType": "net.maxon.datatype.internedid",
386-
"content": "result"
399+
"content": "dotdata"
387400
},
388401
"net.maxon.description.ui.base.groupid",
389402
{
390403
"dataType": "net.maxon.datatype.internedid",
391-
"content": "net.maxon.node.base.group.outputs"
404+
"content": "net.maxon.node.base.group.inputs"
392405
},
393406
"net.maxon.description.ui.base.guitypeid",
394407
{
@@ -407,35 +420,22 @@
407420
"net.maxon.description.base.command",
408421
{
409422
"dataType": "net.maxon.datatype.id",
410-
"content": "group"
423+
"content": "attribute"
411424
},
412425
"net.maxon.description.base.identifier",
413426
{
414427
"dataType": "net.maxon.datatype.internedid",
415-
"content": "net.maxon.node.base.group.object"
428+
"content": "result"
416429
},
417-
"net.maxon.description.data.base.includedfrom",
430+
"net.maxon.description.ui.base.groupid",
418431
{
419-
"dataType": "(net.maxon.datatype.id,net.maxon.datatype.internedid)",
420-
"content": {
421-
"_0": "net.maxon.node.base",
422-
"_1": "dotdata.IJb7_vJ2MdpurOGY2ESr1L"
423-
}
432+
"dataType": "net.maxon.datatype.internedid",
433+
"content": "net.maxon.node.base.group.outputs"
424434
},
425-
"net.maxon.description.ui.base.defaultclassification",
435+
"net.maxon.description.ui.base.guitypeid",
426436
{
427437
"dataType": "net.maxon.datatype.id",
428-
"content": "input"
429-
},
430-
"net.maxon.description.ui.base.groupdefaultopen",
431-
{
432-
"dataType": "bool",
433-
"content": true
434-
},
435-
"net.maxon.description.ui.base.groupid",
436-
{
437-
"dataType": "net.maxon.datatype.internedid",
438-
"content": ""
438+
"content": "net.maxonsdk.ui.dotdataconversion"
439439
}
440440
]
441441
}

plugins/cinema4dsdk/source/tool/pickobject.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,19 @@ Bool PickObjectTool::MouseInput(BaseDocument* doc, BaseContainer& data, BaseDraw
7979
}
8080
if (ret)
8181
{
82-
sprintf(ch, "Picking region from (%d, %d), size (%d, %d)|", xr, yr, wr, hr);
82+
snprintf(ch, sizeof(ch), "Picking region from (%d, %d), size (%d, %d)|", xr, yr, wr, hr);
8383
str += ch;
8484
for (l = 0; l < list->GetCount(); l++)
8585
{
86-
sprintf(ch, ", z = %.4f|", list->GetZ(l));
86+
snprintf(ch, sizeof(ch), ", z = %.4f|", list->GetZ(l));
8787
str += "Found Object " + list->GetObject(l)->GetName() + ch;
8888
}
8989
}
9090
else
9191
{
9292
str = "PickObject failed";
9393
}
94-
sprintf(ch, "|Time: %.2f us", float(timer) * 1000.0f);
94+
snprintf(ch, sizeof(ch), "|Time: %.2f us", float(timer) * 1000.0f);
9595
str += ch;
9696

9797
DeleteMem(pix);

plugins/example.assets/source/asset_api_examples/examples_contexts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ maxon::Result<void> RunLoadMaterialNodeAssets()
940940

941941
// Get its graph for the standard material node space.
942942
maxon::Id nodeSpace = maxon::nodes::MaterialNodeSpaces::Standard.GetId();
943-
material->AddGraph(nodeSpace) iferr_return;
943+
material->CreateDefaultGraph(nodeSpace) iferr_return;
944944
const maxon::nodes::NodesGraphModelRef graph = material->GetGraph(nodeSpace) iferr_return;
945945
if (graph.IsReadOnly())
946946
return maxon::IllegalStateError(MAXON_SOURCE_LOCATION, "Material Node graph is read only."_s);

plugins/example.assets/source/dots_preset_asset_impl/dots_preset_asset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class DotsPresetAssetImpl:
101101
// This is a BasePresetAssetInterface component which is final. It is always going to be the last
102102
// component in the component list of a BasePresetAssetInterface instance, and therefore its
103103
// methods cannot be overridden by other components.
104-
MAXON_COMPONENT(FINAL, maxon::AssetBaseComponent);
104+
MAXON_COMPONENT(FINAL, maxon::BasePresetAssetClass);
105105

106106
public:
107107

plugins/example.image/res/c4d_symbols.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ enum
66
// Plugin IDs
77
PID_COLOR_MANAGEMENT_EXAMPLES = 1059947,
88
PID_OCIO_EXAMPLES = 1060231,
9+
PID_OCIO_AWARE_VIDEOPOST = 1060770,
910

1011
// Command IDs
1112
CID_CLEAR_CONSOLE = 13957,
@@ -16,6 +17,7 @@ enum
1617
IDS_HLP_COLOR_MANAGEMENT_EXAMPLES,
1718
IDS_NME_OCIO_EXAMPLES,
1819
IDS_HLP_OCIO_EXAMPLES,
20+
IDS_NME_OCIO_AWARE_VIDEOPOST,
1921

2022
// End of symbol definition
2123
_DUMMY_ELEMENT_
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef VPOCIOAWARERENDERER_H__
2+
#define VPOCIOAWARERENDERER_H__
3+
4+
enum
5+
{
6+
ID_RENDER_COLOR = 1000,
7+
ID_PRETRANSFORM_OCIO_OUTPUT,
8+
ID_OVERWRITE_OCIO_DISPLAY_SPACE,
9+
ID_OVERWRITE_OCIO_VIEW_TRANSFORM
10+
};
11+
12+
#endif // VPOCIOAWARERENDERER_H__
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CONTAINER VPocioawarerenderer
2+
{
3+
NAME VPocioawarerenderer;
4+
INCLUDE VPbase;
5+
6+
GROUP ID_VIDEOPOSTPROPERTIES
7+
{
8+
COLOR ID_RENDER_COLOR { OPEN; }
9+
BOOL ID_PRETRANSFORM_OCIO_OUTPUT { ANIM OFF; }
10+
BOOL ID_OVERWRITE_OCIO_DISPLAY_SPACE { ANIM OFF; }
11+
BOOL ID_OVERWRITE_OCIO_VIEW_TRANSFORM { ANIM OFF; }
12+
}
13+
}

plugins/example.image/res/strings_en-US/c4d_strings.str

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ STRINGTABLE
44
IDS_HLP_COLOR_MANAGEMENT_EXAMPLES "Demonstrates how to handle color spaces, profiles, and formats in the Image API.";
55
IDS_NME_OCIO_EXAMPLES "C++ SDK: OCIO Examples";
66
IDS_HLP_OCIO_EXAMPLES "Demonstrates how interact with the OCIO settings and color spaces of a scene.";
7+
IDS_NME_OCIO_AWARE_VIDEOPOST "Ocio Aware Renderer";
78
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
STRINGTABLE VPocioawarerenderer
2+
{
3+
VPocioawarerenderer "Ocio Aware Renderer";
4+
ID_RENDER_COLOR "Input Color";
5+
ID_PRETRANSFORM_OCIO_OUTPUT "Transfrom OCIO Outputs from sRGB";
6+
ID_OVERWRITE_OCIO_DISPLAY_SPACE "Overwrite OCIO Display Sapce";
7+
ID_OVERWRITE_OCIO_VIEW_TRANSFORM "Overwrite OCIO View Transform";
8+
}

0 commit comments

Comments
 (0)