-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use templates to process custom attributes #583
Use templates to process custom attributes #583
Conversation
@@ -1761,49 +1661,49 @@ void aiMeshSample<T>::fillSplitVertices(int split_index, aiPolyMeshData& data) c | |||
copy_or_clear_3_to_4<abcC4, abcC3>((abcC4*)data.rgb, m_rgb_ref, split); | |||
} | |||
|
|||
static inline void copy_or_clear_vector(AttributeDataToTransfer dst[], const std::vector<AttributeData*>& src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be templated as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
* First pass to extract redundant code and have one single template function * Use templates in other parts of aiMeshSchema to handle custom attributes. * Fix post-merge issues * Add specific supports for IC3f and IN4f attributes * Remove test code * Remove unused includes
* First pass to extract redundant code and have one single template function * Use templates in other parts of aiMeshSchema to handle custom attributes. * Fix post-merge issues * Add specific supports for IC3f and IN4f attributes * Remove test code * Remove unused includes
…580) * transfer harcoded array of float * change subD to aiPolyMesh * draft template function fix commit * working hardcoded * hardcoded transfer of data assigned to array of attributeData * set uv using custom attribute hardcoded * generalize using switch step1 * fix color and push isConstant to map arrays correctly * get resize count within the summary + better memory managment clean * remove commented testing function * remove commented function * working curve support * only read the one that we currently support * remove unused function * better memory managment * clean * Use templates to process custom attributes (#583) * First pass to extract redundant code and have one single template function * Use templates in other parts of aiMeshSchema to handle custom attributes. * Fix post-merge issues * Add specific supports for IC3f and IN4f attributes * Remove test code * Remove unused includes * working curve support * only read the one that we currently support * remove unused function * better memory managment * clean * working curve templated * templated copy data method * working curve support * remove unused function * working curve templated * templated copy data method * clean * clean * missing generalizaiton * rename att_int * apply formatting * remove static from function * revert static * remove copied function and clean readAttributes * remove comment * remove comment * Format --------- Co-authored-by: thomas-tu <45040865+thomas-tu@users.noreply.github.com> Co-authored-by: Thomas Tu <thomastu@unity3d.com>
Purpose of this PR
Ticket/Jira #:
Use templated functions to get the custom attributes.