Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi:
@PATPAT First of all, the point movement algorithm of attitude deformation label is not complicated.
I've seen in some tutorials that you can add some data to a port with unconventional operations, but I forgot . So, I use Python nodes.
The data control label object weight value for the input port, so you need to add a user data of type link to the Python node.
Python is a dynamic language, and data types cannot be determined before compilation. There is no conditional right or wrong judgment in my code, so please add them by yourself.
import c4d def main(): obj = op[c4d.ID_USERDATA,1] Tags = obj.GetTags() Pose = [tag for tag in Tags if tag.GetRealType() == 1024237] #[4000,1101] is the ID of the strength value. Pose[0][4000,1101] = Input1 global Output1 Output1 = Pose[0][4000,1101]
After a trial run, the script was tested successfully. By setting the name suffix of Python Tag, the problem of repeated running of Tag can be solved.
Taking c4d.DIRTYFLAGS_SELECT as an example, if the point, line, and surface selections change, it will execute, otherwise it won't.
The Python script code is as follows:
import c4d #e-mail: [email protected] def main(): Name = op.GetName() Objects = op.GetObject() Changed = Objects.GetDirty(c4d.DIRTYFLAGS_SELECT) Text = ["xit" + str(Changed)[-1]] if str(Name).count(Text[0][:-1]) != 0 : if str(Name).find(Text[0][:-1]) != str(Name).rfind(Text[0][:-1]) : if str(Name)[str(Name).rfind(Text[0][:-1]):] == Text[0] : if str(Name).find(Text[0][:-1]) <= 0: #Do not execute, exit the program. print ("Does not perform.") op.SetName(str(Text[0])) return else: #Do not execute, exit the program. op.SetName(str(Name)[:str(Name).find(Text[0][:-1])] + str(Text[0])) print ("Does not perform.") return else: if str(Name).find(Text[0][:-1]) <= 0: op.SetName(str(Text[0])) print ("Perform.") else: op.SetName(str(Name)[:str(Name).find(Text[0][:-1])] + str(Text[0])) print ("Perform.") else: if str(Name)[str(Name).rfind(Text[0][:-1]):] == Text[0] : #Do not execute, exit the program. print ("Does not perform.") return else: op.SetName(str(Name)[:str(Name).find(Text[0][:-1])] + str(Text[0])) print ("Perform.") else: print ("Perform.") op.SetName(str(Name) + str(Text[0])) print ("pass") #The next thing to execute.
HI:
I recently doing point cloud reconstruction, and it's really not a difficult problem. So the first thing you have to do is figure out 2 points and the center of the circle, so there are 3 points.Then figure out the length of each side of the triangle surrounded by 3 points, and finally figure out the Angle between 2 points and the center of the circle.You plug in the arc length formula and you get the arc length between 2 points.
@kbar Thank you very much for your great work, because C++ development documentation has long lacked user education, and .XDL64 files cannot be generated smoothly even for novices who have the source files.You are really great to replace the SDK-team to complete the user education.
Before you posted the video, many people posted C++ development videos for C4D, but after version R19, the API interface parameters changed, and these videos lost their user education significance.Thank you for your contribution to making more people learn how to generate .XDL64 files. This is the first and most important first step.
@ferdinand Generating the .XDL64 file is the most important first step, but in the C++ development documentation, the Project Tool chapter is very professional and prevents novices from properly generating the .XDL64 file.
Suggest additional development steps, such as 1,2,3,..... Such as:
1: Download the Project Tool. 2: Create a new .TXT file and write it to ......\cinema4d_r23_project_tool_314356_win-macos\kernel_app_64bit.exe g_updateproject=...... 3: .TXT file format changed to.bat. 4: ... 5: ... ......
edit: This topic has been forked from C++ Plugin Development Tutorials [Ferdinand]
Graphic compilation C++ code process is herelink text, video compilation C++ code process is in the home @kbar page.
As an expensive commercial software, C4D does not do a good job in how to compile the C++ SDK. If it is not for other C4D users to publish tutorials and only rely on the compilation instructions of the C++ SDK development document, it is true that even the first step of the compilation can not be successful. The SDK team should make a change.
Hi :
I don't think you're going to get the answer you're looking for, the Octane renderer is not a Maxon product, so it's beyond the SDK team's technical support. Therefore, you should contact the Octane development team.
Also, the code you give is incomplete, and partial translation is useless. The Octane renderer has an OSL node, which can be used to create custom nodes in the OSL language.
Finally, it's important to point out that Python is a glue language, and the underlying core code is still written in C and C++. If the Octane renderer is installed, Python cannot drive the Octane renderer without the corresponding API parameters. However, you can use Python to simply change the Octane parameters, such as changing the rendering resolution.
In summary, if the Octane renderer does not have open Python API parameters, then C++ is the only option.
There seems to be a delay in receiving emails for resetting passwords and registering accounts today, which is about 5 hours late. Here, I would like to ask two questions:
1, the forum can not be searched without registration. However, when registering, even if the email address does not exist, you can still register successfully, but you can only search, not comment and post, because you did not click the email confirmation link.
Is it possible to search as a visitor without logging in? After all, you don't have to verify the validity of your email address to sign up .
"Maxon One" has fully promoted the subscription system, but Plugin Cafe forum and Redshift forum accounts cannot log in to each other.
Whether can realize the account mutual login, at least can search each other's forum content ?
Hello @ferdinand :
In this transition period , can you make a small change and write a detailed C++ plug-in development process in the forum ? Collect the development details of the scattered generated compiled files into a post and place it at the top of the forum.
Do you want to make a complete copy of another polygon object from scratch using Python tags?Including n-gon edges.
You hide edges incorrectly, it's still not an n-gon edge, it's just an edge selection.I have the full Python tag code, which is fast, but I won't post it here.However, this Python tag only runs in R23 and up.Since Python cannot directly create polygons with n-gon edges, it can only be done with the Model Elimination command in versions R23 and above.
Your Python code isn't optimal, so it's not fast.The fastest way to do this is to use C++, which can create polygons with n-gon edges directly and at tens of times the speed of Python tags.Also, Python tags create n-gon polygons that don't have the same edge indexes as the n-gon polygons that copy objects, which is one of Python's flaws.
You can generate multiple cache items in the Python generator at the same time, such as polygon objects, material labels, standard material balls, and vector color labels, but you cannot add vector color labels to material balls. Base_Objects and Base_tag can be added to cached documents at this stage, while materials cannot be added to cached documents at this stage.The vector color tag exists in the cached document, and the material exists in the active document. The material cannot receive the vector color tag in the cached document, so this is not possible.
Even though it might someday be possible to add a polygon object, a material label, a standard material ball, and a vector color label to a cached document, the renderer can only receive one document for rendering, so that's not possible.
Please use Python tags, entities to generate various objects, this is to achieve the desired effect.If done through the Python generator, the final result simply returns None, remembering to insert various objects into the current document.
Your problem is that the material ball is stored on the hard disk, while the polygon object generated by the Python generator is stored on the memory strip (cache).Only objects from the hard disk can be added to the cache. Cache objects must be instantiated (collapsed) to be added to the hard disk. To display shading, a material ball is required, but the vector color tag in the cache cannot be added to the material ball in the hard disk. There are two solutions:
I want to get the point weights of non-Python Field objects . I looked carefully at the Python Effectors code that came with it and knew that FieldOutput was an instance . Suppose you create a new Plain effect and create a cube field . Is there a way to get the weight of the cube field points?
FieldOutput
The fieldOutput.getValue (Index) function cannot get the point weights of other Field objects. So , is there any way to get the weights?That seems difficult to achieve.
fieldOutput.getValue (Index)